Skip to content
Snippets Groups Projects
Commit d64b9f99 authored by Dorian Koch's avatar Dorian Koch
Browse files

fix bug

parent de042295
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ if 'LDAP_HOST' in config: ...@@ -7,7 +7,7 @@ if 'LDAP_HOST' in config:
import ldap3 import ldap3
def ldapauth(user, password): # pylint: disable=function-redefined def ldapauth(user, password): # pylint: disable=function-redefined
if LDAP_USERRE.search(user): if not user or not password or LDAP_USERRE.search(user):
return {}, [] return {}, []
try: try:
server = ldap3.Server(config['LDAP_HOST'], port=config['LDAP_PORT'], use_ssl=True) server = ldap3.Server(config['LDAP_HOST'], port=config['LDAP_PORT'], use_ssl=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment