From d64b9f998d843f2e36e3d58e53bf11a9c977966a Mon Sep 17 00:00:00 2001
From: Dorian Koch <doriank@fsmpi.rwth-aachen.de>
Date: Sat, 8 Mar 2025 19:07:01 +0100
Subject: [PATCH] fix bug

---
 ldap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap.py b/ldap.py
index 47a079e..61adcd3 100644
--- a/ldap.py
+++ b/ldap.py
@@ -7,7 +7,7 @@ if 'LDAP_HOST' in config:
 	import ldap3
 
 	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 {}, []
 		try:
 			server = ldap3.Server(config['LDAP_HOST'], port=config['LDAP_PORT'], use_ssl=True)
-- 
GitLab