1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-03 11:57:41 +02:00

properly implementing minimum lenght limit in search

This commit is contained in:
kakwa 2016-07-06 20:47:33 +02:00
parent 3b6cf61b93
commit baee15c40f
4 changed files with 5 additions and 5 deletions

View file

@ -890,7 +890,7 @@ class LdapCherry(object):
""" search user page """
self._check_auth(must_admin=False)
is_admin = self._check_admin()
if searchstring is not None:
if searchstring is not None and len(searchstring) > 2:
res = self._search(searchstring)
else:
res = None
@ -927,7 +927,7 @@ class LdapCherry(object):
""" search user page """
self._check_auth(must_admin=True)
is_admin = self._check_admin()
if searchstring is not None:
if searchstring is not None and len(searchstring) > 2:
res = self._search(searchstring)
else:
res = None