diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-03-12 15:25:29 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-03-12 15:25:29 -0700 |
commit | aadba603f877536ed0a1b0e12ede527baec98475 (patch) | |
tree | 85c89800cd093a8e1fa292a9e647368167060227 /alot/commands/utils.py | |
parent | 9e2cd32ab0b7a1906c2cf47f594a70fcaf901502 (diff) |
envelope: Update encryption keys when CC, To, or From is changed
Currently the encryption keys will only be updated when they are
toggled, which means that if you change a Cc or To then the keys
encrypted to might be wrong, either too many keys will be encrypted to,
or not enough, or just the wrong ones.
This patches fixes this by calling set_encrypt whenever the 'To', 'Cc',
or 'From' headers are changed by set or unset.
Fixes #1227
Diffstat (limited to 'alot/commands/utils.py')
-rw-r--r-- | alot/commands/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/utils.py b/alot/commands/utils.py index 7a1c0ac1..e1fc26df 100644 --- a/alot/commands/utils.py +++ b/alot/commands/utils.py @@ -46,7 +46,7 @@ def set_encrypt(ui, envelope, block_error=False, signed_only=False): keys = yield _get_keys(ui, encrypt_keys, block_error=block_error, signed_only=signed_only) if keys: - envelope.encrypt_keys.update(keys) + envelope.encrypt_keys = keys envelope.encrypt = True if 'From' in envelope.headers: |