Patch that fixes multiple mail atributes returned by shib
authorLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Tue, 29 Jan 2013 15:10:19 +0000 (17:10 +0200)
committerLeonidas Poulopoulos <leopoul@noc.grnet.gr>
Tue, 29 Jan 2013 15:10:19 +0000 (17:10 +0200)
flowspec/views.py

index 2e68324..ad8111d 100644 (file)
@@ -471,6 +471,6 @@ def send_new_mail(subject, message, from_email, recipient_list, bcc_list):
 
 def lookupShibAttr(attrmap, requestMeta):
     for attr in attrmap:
-        if attr in requestMeta:
+        if (attr in requestMeta) & (len(requestMeta[attr]) > 0):
             return requestMeta[attr]
     return ''
\ No newline at end of file