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:
parent
3b6cf61b93
commit
baee15c40f
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue