pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
700 stars 163 forks source link

db/utils: perform signature validation on original message bytes #1487

Closed pacien closed 4 years ago

pacien commented 4 years ago

Parsing and re-serialising a Message sometimes alters the original content (by removing extra lines between nested message multiparts for example). This interfers with the signature validation which requires the byte content to match perfectly.

To avoid this issue, we perform the signature validation on the original message bytes directly.

GitHub: resolves #1459

pazz commented 4 years ago

It seems the build only fails for the docs..

pacien commented 4 years ago

It seems the build only fails for the docs..

Not sure of why. It's failing on a file that I didn't touched (signals.rst). The error is the same on another recent pull request.

pazz commented 4 years ago

aha, it seems that travis has updated the sphinx version they use for building docs and that one is less forgiving..

pacien commented 4 years ago

It seems that there's another issue with line ending that I forgot to take into account. This is not ready for merging.

pacien commented 4 years ago

The issue with the line ending is solved. This PR is now ready to be reviewed again.

I tested it with some emails sent from ProtonMail (in the unit test) and Evolution and they now validate correctly.

pacien commented 4 years ago

@pazz up!

pazz commented 4 years ago

@pacien please rebase to master. The travis docs issue should be fixed and I want to see the tests passing for all python 3 versions as I'm somewhat worried by the use of email policies (which have been changed around in recent versions).. Cheers,

pacien commented 4 years ago

Rebased!