From 4b3543d3c009d3b854c75ac0d070f1decbaaf26f Mon Sep 17 00:00:00 2001 From: Johann Frei <27365662+j-frei@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:58:12 +0100 Subject: [PATCH] =?UTF-8?q?fix(ui):=20allow=20empty=20LDAP=20Application?= =?UTF-8?q?=20DN=20value=20and=20password=20in=20General=20setting?= =?UTF-8?q?=E2=80=A6=20(#21742)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allow empty LDAP Application DN value and password in General settings form * fix(ui): use LDAP app_dn, app_dn_password with empty string instead of enforcing non-empty values --- backend/open_webui/routers/auths.py | 6 ++---- src/lib/components/admin/Settings/General.svelte | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/open_webui/routers/auths.py b/backend/open_webui/routers/auths.py index 9b246b297..f3c4fbc6d 100644 --- a/backend/open_webui/routers/auths.py +++ b/backend/open_webui/routers/auths.py @@ -1157,8 +1157,6 @@ async def update_ldap_server( "host", "attribute_for_mail", "attribute_for_username", - "app_dn", - "app_dn_password", "search_base", ] for key in required_fields: @@ -1173,8 +1171,8 @@ async def update_ldap_server( request.app.state.config.LDAP_ATTRIBUTE_FOR_USERNAME = ( form_data.attribute_for_username ) - request.app.state.config.LDAP_APP_DN = form_data.app_dn - request.app.state.config.LDAP_APP_PASSWORD = form_data.app_dn_password + request.app.state.config.LDAP_APP_DN = form_data.app_dn or "" + request.app.state.config.LDAP_APP_PASSWORD = form_data.app_dn_password or "" request.app.state.config.LDAP_SEARCH_BASE = form_data.search_base request.app.state.config.LDAP_SEARCH_FILTERS = form_data.search_filters request.app.state.config.LDAP_USE_TLS = form_data.use_tls diff --git a/src/lib/components/admin/Settings/General.svelte b/src/lib/components/admin/Settings/General.svelte index 5f62c191e..fd0c84227 100644 --- a/src/lib/components/admin/Settings/General.svelte +++ b/src/lib/components/admin/Settings/General.svelte @@ -542,7 +542,6 @@ > @@ -554,6 +553,7 @@