summaryrefslogtreecommitdiff
path: root/keymanager/src
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-11-21 12:33:43 -0300
committerTomás Touceda <chiiph@leap.se>2013-11-21 12:33:43 -0300
commit1fe6c297051b6147760f9c1778cf718693bf5a7a (patch)
treed1e3992b284f3b3c5a2a22ea2380abec4d2cfd69 /keymanager/src
parent49cd309bb0d206fe7bcd0a12b7fcc0199de7b65b (diff)
parentc9065eccaaed40d053d16afc9cea14e122e60fe0 (diff)
Merge remote-tracking branch 'ivan/bug/4491_remove-failing-regex' into develop
Diffstat (limited to 'keymanager/src')
-rw-r--r--keymanager/src/leap/keymanager/openpgp.py6
1 files changed, 5 insertions, 1 deletions
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)