[ldapparser] utf-8 uri + unicode emailaddr will crash if the later is not properly encoded (closes #2508515)
--- a/sobjects/ldapparser.py Tue Oct 02 16:44:55 2012 +0200
+++ b/sobjects/ldapparser.py Wed Oct 17 15:47:12 2012 +0200
@@ -151,7 +151,8 @@
elif self.sourceuris:
# pop from sourceuris anyway, else email may be removed by the
# source once import is finished
- self.sourceuris.pop(str(userdict['dn'] + '@@' + emailaddr), None)
+ uri = userdict['dn'] + '@@' + emailaddr.encode('utf-8')
+ self.sourceuris.pop(uri, None)
# XXX else check use_email relation?
@cached