From aadba603f877536ed0a1b0e12ede527baec98475 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 12 Mar 2018 15:25:29 -0700 Subject: 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 --- alot/commands/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot/commands/utils.py') 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: -- cgit v1.2.3