Skip to content
Snippets Groups Projects
Commit 34cdfca2 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed behaviour of core.Session.get if called with non-canonical DNs

parent 40ee661e
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,14 @@ class Session:
if not conn.response:
return None
assert len(conn.response) == 1
assert conn.response[0]['dn'] == dn
if conn.response[0]['dn'] != dn:
# To use DNs as cache keys, we assume each DN has a single unique string
# representation. This is not generally true: RDN attributes may be
# case insensitive or values may contain escape sequences.
# In this case, the provided DN differs from the canonical form the
# server returned. We cannot handle this consistently, so we report no
# match.
return None
obj = Object(self, conn.response[0])
self.state.objects[dn] = obj
self.committed_state.objects[dn] = obj
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment