[CalendarServer-changes] [8284] CalendarServer/trunk/twistedcaldav/directory
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 11 15:10:32 PST 2011
Revision: 8284
http://trac.macosforge.org/projects/calendarserver/changeset/8284
Author: sagen at apple.com
Date: 2011-11-11 15:10:32 -0800 (Fri, 11 Nov 2011)
Log Message:
-----------
Collpase multiple whitespace within LDAP rdn's into a single space.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py
Modified: CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-11-11 22:04:16 UTC (rev 8283)
+++ CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-11-11 23:10:32 UTC (rev 8284)
@@ -1068,7 +1068,7 @@
@type dnStr: C{str}
@return: normalized dn C{str}
"""
- return ldap.dn.dn2str(ldap.dn.str2dn(dnStr.lower()))
+ return ' '.join(ldap.dn.dn2str(ldap.dn.str2dn(dnStr.lower())).split())
def buildFilter(mapping, fields, operand="or"):
Modified: CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py 2011-11-11 22:04:16 UTC (rev 8283)
+++ CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py 2011-11-11 23:10:32 UTC (rev 8284)
@@ -671,5 +671,7 @@
"uid=foo,cn=users,dc=example,dc=com"),
("uid=FoO , cn=uS eRs , dc=ExA mPlE , dc=CoM",
"uid=foo,cn=us ers,dc=exa mple,dc=com"),
+ ("uid=FoO , cn=uS eRs , dc=ExA mPlE , dc=CoM",
+ "uid=foo,cn=us ers,dc=exa mple,dc=com"),
):
self.assertEquals(expected, normalizeDNstr(input))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111111/75a094db/attachment.html>
More information about the calendarserver-changes
mailing list