From 95b3944adec670869695c3828efc13f7f02d56eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dipl=2E=20Ing=2E=20P=C3=A9ter=20Varkoly?= Date: Sat, 31 May 2025 13:36:59 +0200 Subject: [PATCH] Do not read server info by bind to avoid needless network trafic. --- radicale/auth/ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/auth/ldap.py b/radicale/auth/ldap.py index 3ca4ddb3..e45aeb29 100644 --- a/radicale/auth/ldap.py +++ b/radicale/auth/ldap.py @@ -226,7 +226,7 @@ class Auth(auth.BaseAuth): except Exception as e: logger.debug(f"_login3 error 1 {e} (reader)") pass - if not conn.bind(): + if not conn.bind(read_server_info=False): logger.debug("_login3 cannot bind (reader)") raise RuntimeError("Unable to read from LDAP server") logger.debug(f"_login3 bind as {self._ldap_reader_dn}") @@ -257,7 +257,7 @@ class Auth(auth.BaseAuth): conn.start_tls() except self.ldap3.core.exceptions.LDAPStartTLSError as e: raise RuntimeError(f"_login3 StartTLS Error: {e}") - if not conn.bind(): + if not conn.bind(read_server_info=False): logger.debug(f"_login3 user '{login}' cannot be found") return "" tmp: list[str] = []