From 82ff6c371b88a4dcda85a000a4bd2dfbbc912789 Mon Sep 17 00:00:00 2001 From: "Li, Steel" Date: Tue, 7 Jan 2025 14:13:18 +0800 Subject: [PATCH] use ldap3.NONE for parameter get_info in ldap_auth function to accelerate login --- backend/open_webui/routers/auths.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/auths.py b/backend/open_webui/routers/auths.py index 1a89058fa..14614ce69 100644 --- a/backend/open_webui/routers/auths.py +++ b/backend/open_webui/routers/auths.py @@ -51,7 +51,7 @@ from open_webui.utils.access_control import get_permissions from typing import Optional, List from ssl import CERT_REQUIRED, PROTOCOL_TLS -from ldap3 import Server, Connection, ALL, Tls +from ldap3 import Server, Connection, NONE, Tls from ldap3.utils.conv import escape_filter_chars router = APIRouter() @@ -201,7 +201,7 @@ async def ldap_auth(request: Request, response: Response, form_data: LdapForm): server = Server( host=LDAP_SERVER_HOST, port=LDAP_SERVER_PORT, - get_info=ALL, + get_info=NONE, use_ssl=LDAP_USE_TLS, tls=tls, )