Skip to content

Commit 07bd4a6

Browse files
committed
fixup! feat(ldap.filter): add is_filter() to verify filter syntax
1 parent 97b7e31 commit 07bd4a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/ldap/filter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def is_filter(ldap_filter):
100100
return _ldap.is_filter(ldap_filter)
101101

102102
# workaround for libldap <= 2.7
103+
if '\x00' in ldap_filter:
104+
raise ValueError('embedded null character')
103105
import ldap
104106
lo = ldap.initialize('')
105107
try:

0 commit comments

Comments
 (0)