Comment 82 for bug 401028

Revision history for this message
temugen (temugen) wrote :

Laurent: First off, thanks so much for the backtrace; it's exactly what I thought it would be. Should this not be filed as a new bug?

The patch for the corrupt shac value blatantly ignores the exception (just logs it) because the value is not used anywhere else, and ignoring it follows the logic of the rest of the codebase. However, ignoring corrupted shad values in this way could be a bad idea. If the data hash is corrupt, that signals that the data (a profile icon for example) could also be corrupt. Now, there are two reasonable ways to fix this:
A) Follow the logic set in place by the codebase as if the data hashes, while valid, don't match. I haven't look at the code yet but I believe that logic is to drop the invalid data message. After logging, this would be the proper way to handle corrupt data imo.
B) Let FD.o take care of it. It should be up to them how they want to handle corrupt messages.

Unfortunately there are still many unchecked exceptions throughout papyon aside from this one.