Merge pull request #11409 from chengscott/patch-1

[feat] anonymous bind when LDAP_APP_DN is not specified
This commit is contained in:
Timothy Jaeryang Baek 2025-03-08 12:11:13 -04:00 committed by GitHub
commit e7013d45c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,7 +210,7 @@ async def ldap_auth(request: Request, response: Response, form_data: LdapForm):
LDAP_APP_DN,
LDAP_APP_PASSWORD,
auto_bind="NONE",
authentication="SIMPLE",
authentication="SIMPLE" if LDAP_APP_DN else "ANONYMOUS",
)
if not connection_app.bind():
raise HTTPException(400, detail="Application account bind failed")