You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LDAP search filters with escaped bytes of 0x80 or higher send the wrong value #2357
RFC 4515 defines each \XX escape in a filter value as one octet. LDAPConnection._processLdapString() turns each escape into the code point chr(0xXX). Since #1980, AssertionValue encodes str values as UTF-8, so any escaped byte of 0x80 or higher becomes two bytes on the wire.
As a result, filters on binary attributes such as objectGUID or objectSid (for example (objectGUID=\a1\b2...)) and filters that escape UTF-8 characters (for example (cn=Jos\c3\a9)) return no entries, even though the same filter works with ldapsearch or Get-ADObject -LDAPFilter. Escapes below 0x80, such as \28, \29, \2a and \00, are not affected.
Before #1980, pyasn1's default latin-1 encoding mapped chr(0xXX) back to the original byte, so binary escapes worked but unescaped non-ASCII values did not.
Activity
anadrianmanrique commentedon Nov 25, 2026
fixed at #2358