Merge pull request #8376 from steelcg/dev

perf: use ldap3.NONE for parameter get_info in ldap_auth function to accelerate login
This commit is contained in:
Timothy Jaeryang Baek 2025-01-07 23:50:11 -08:00 committed by GitHub
commit 70914d2764
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ from open_webui.utils.access_control import get_permissions
from typing import Optional, List from typing import Optional, List
from ssl import CERT_REQUIRED, PROTOCOL_TLS 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 from ldap3.utils.conv import escape_filter_chars
router = APIRouter() router = APIRouter()
@ -201,7 +201,7 @@ async def ldap_auth(request: Request, response: Response, form_data: LdapForm):
server = Server( server = Server(
host=LDAP_SERVER_HOST, host=LDAP_SERVER_HOST,
port=LDAP_SERVER_PORT, port=LDAP_SERVER_PORT,
get_info=ALL, get_info=NONE,
use_ssl=LDAP_USE_TLS, use_ssl=LDAP_USE_TLS,
tls=tls, tls=tls,
) )