summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-15 18:08:36 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-15 18:08:36 -0400
commitc8560954615b94e21b7605a1e095481c6a022721 (patch)
treed8f6858348e1b87a377a76321895c2d02a95d45b /wallace
parentadf90b45b28b458931ff69fb77caebe3c868d84b (diff)
downloadpykolab-c8560954615b94e21b7605a1e095481c6a022721.tar.gz
Catch failures on base64 decoding event UIDs from owner confirmation replies (#3423)
Diffstat (limited to 'wallace')
-rw-r--r--wallace/module_resources.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 55d7472..c41413a 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -205,10 +205,13 @@ def execute(*args, **kw):
for recipient in recipients:
# extract reference UID from recipients like resource+UID@domain.org
if re.match('.+\+[A-Za-z0-9=/-]+@', recipient):
- (prefix, host) = recipient.split('@')
- (local, uid) = prefix.split('+')
- reference_uid = base64.b64decode(uid, '-/')
- recipient = local + '@' + host
+ try:
+ (prefix, host) = recipient.split('@')
+ (local, uid) = prefix.split('+')
+ reference_uid = base64.b64decode(uid, '-/')
+ recipient = local + '@' + host
+ except:
+ continue
if not len(resource_record_from_email_address(recipient)) == 0:
resource_recipient = recipient