diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-07-10 12:24:07 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-07-11 12:52:04 -0700 |
commit | 9f9d4639a68245555b6aa777a0269b45dce5035f (patch) | |
tree | eeb0220a8f7a73500d38e525107df4447bd5b837 /alot | |
parent | 20f534dde5f0f7382de43cf4d7853f29666b865d (diff) |
utils: Fix verifying signatures
To verify the signature correctly we need to ensure that the body of the
message is decoded the same way as it was when it was signed,
specifically using helper.email_as_string to insert \r\n instead of
.as_string, which only inserts \n.
Fixes #1079
Diffstat (limited to 'alot')
-rw-r--r-- | alot/db/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py index 2bcf6aca..ac91098a 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -140,8 +140,9 @@ def message_from_file(handle): sigs = [] if not malformed: try: - sigs = crypto.verify_detached(m.get_payload(0).as_string(), - m.get_payload(1).get_payload()) + sigs = crypto.verify_detached( + helper.email_as_string(m.get_payload(0)), + m.get_payload(1).get_payload()) except GPGProblem as e: malformed = unicode(e) |