diff options
| author | Tomás Touceda <chiiph@leap.se> | 2013-11-21 12:33:43 -0300 | 
|---|---|---|
| committer | Tomás Touceda <chiiph@leap.se> | 2013-11-21 12:33:43 -0300 | 
| commit | 8cf21f1ba5679bf576f7bb4ed1e61e384a1263fa (patch) | |
| tree | 4da46fdfa43eece3a40b3925cec5057bfc036df9 | |
| parent | ae80ea1f0a748c2746026bd1a17815d786722b84 (diff) | |
| parent | 146948c060c1f69b997400e995ec9d4ba4160c56 (diff) | |
Merge remote-tracking branch 'ivan/bug/4491_remove-failing-regex' into develop
| -rw-r--r-- | changes/email-checks | 3 | ||||
| -rw-r--r-- | src/leap/keymanager/openpgp.py | 6 | 
2 files changed, 8 insertions, 1 deletions
| diff --git a/changes/email-checks b/changes/email-checks new file mode 100644 index 00000000..eee7de75 --- /dev/null +++ b/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/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py index f6223d57..cb46371c 100644 --- a/src/leap/keymanager/openpgp.py +++ b/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) | 
