summaryrefslogtreecommitdiff
path: root/alot/commands
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2018-06-21 11:41:00 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2018-06-21 11:41:00 +0100
commit70010c0225dbfdebe0813b74354283ba6fcee514 (patch)
treede7a3b730734608fa0bd72ceb05aae638d267188 /alot/commands
parent43e370fa92dfc7c0977c311e0d71e9e57f3ea575 (diff)
update gpg keys only if envelope asks for encryption
This prevents the update of the gpg keys stored in an envelope, triggered by a header change, in case envelope.encrypt is set to false. Fixes the issue that I reported on #1228
Diffstat (limited to 'alot/commands')
-rw-r--r--alot/commands/envelope.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 4b02e67e..94d746cc 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -427,8 +427,8 @@ class SetCommand(Command):
# Currently we don't handle bcc because it creates a side channel leak,
# as the key of the person BCC'd will be available to other recievers,
# defeating the purpose of BCCing them
- if self.key.lower() in ['to', 'from', 'cc']:
- yield utils.update_keys(ui, ui.current_buffer.envelope)
+ if self.key.lower() in ['to', 'from', 'cc'] and envelope.encrypt:
+ yield utils.update_keys(ui, envelope)
ui.current_buffer.rebuild()