Dipl. Ing. Péter Varkoly před 1 rokem
rodič
revize
645619bac8
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      radicale/auth/ldap.py

+ 3 - 3
radicale/auth/ldap.py

@@ -107,7 +107,7 @@ class Auth(auth.BaseAuth):
             pass
             pass
 
 
         if not conn.bind():
         if not conn.bind():
-            logger.debug(f"_login3 can not bind")
+            logger.debug("_login3 can not bind")
             raise RuntimeError("Unable to read from ldap server")
             raise RuntimeError("Unable to read from ldap server")
 
 
         logger.debug(f"_login3 bind as {self._ldap_reader_dn}")
         logger.debug(f"_login3 bind as {self._ldap_reader_dn}")
@@ -119,7 +119,7 @@ class Auth(auth.BaseAuth):
             attributes=['memberOf']
             attributes=['memberOf']
         )
         )
         if len(conn.entries) == 0:
         if len(conn.entries) == 0:
-            logger.debug(f"_login3 user can not be find")
+            logger.debug(f"_login3 user '{login}' can not be find")
             """User could not be find"""
             """User could not be find"""
             return ""
             return ""
 
 
@@ -131,7 +131,7 @@ class Auth(auth.BaseAuth):
             """Try to bind as the user itself"""
             """Try to bind as the user itself"""
             conn = self.ldap3.Connection(server, user_dn, password=password)
             conn = self.ldap3.Connection(server, user_dn, password=password)
             if not conn.bind():
             if not conn.bind():
-                logger.debug(f"_login3 user can not be find")
+                logger.debug(f"_login3 user '{login}' can not be find")
                 return ""
                 return ""
             if self._ldap_load_groups:
             if self._ldap_load_groups:
                 tmp = []
                 tmp = []