diff --git a/uffd/session/views.py b/uffd/session/views.py index b401563e0099803c06dcfd0bd6beb1625e05bcd0..3b5027eeaaa1451c28221eb405426d112866ea88 100644 --- a/uffd/session/views.py +++ b/uffd/session/views.py @@ -33,9 +33,11 @@ def login_get_user(loginname, password): else: # When using a LDAP service connection, try bind with separate user connection if current_app.config['LDAP_SERVICE_BIND_DN']: - server = ldap3.Server(current_app.config["LDAP_SERVICE_URL"], get_info=ldap3.ALL) + server = ldap3.Server(current_app.config["LDAP_SERVICE_URL"]) try: conn = connect_and_bind_to_ldap(server, dn, password) + if conn is None: + raise LDAPBindError except (LDAPBindError, LDAPPasswordIsMandatoryError): return None else: