summaryrefslogtreecommitdiff
path: root/keymanager
diff options
context:
space:
mode:
Diffstat (limited to 'keymanager')
-rw-r--r--keymanager/changes/email-checks3
-rw-r--r--keymanager/src/leap/keymanager/openpgp.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/keymanager/changes/email-checks b/keymanager/changes/email-checks
new file mode 100644
index 0000000..eee7de7
--- /dev/null
+++ b/keymanager/changes/email-checks
@@ -0,0 +1,3 @@
+ o Remove address check when sending email and rely in the email client to
+ verify that is correct. Closes #4491.
+ o Support sending encrypted mails to addresses using the '+' sign.
diff --git a/keymanager/src/leap/keymanager/openpgp.py b/keymanager/src/leap/keymanager/openpgp.py
index f6223d5..cb46371 100644
--- a/keymanager/src/leap/keymanager/openpgp.py
+++ b/keymanager/src/leap/keymanager/openpgp.py
@@ -297,7 +297,11 @@ class OpenPGPScheme(EncryptionScheme):
:rtype: OpenPGPKey
@raise KeyNotFound: If the key was not found on local storage.
"""
- leap_assert(is_address(address), 'Not an user address: %s' % address)
+ # Remove the identity suffix after the '+' until the '@'
+ # e.g.: test_user+something@provider.com becomes test_user@probider.com
+ # since the key belongs to the identity without the '+' suffix.
+ address = re.sub(r'\+.*\@', '@', address)
+
doc = self._get_key_doc(address, private)
if doc is None:
raise errors.KeyNotFound(address)