mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-22 17:42:18 -05:00
[GH-ISSUE #13701] issue: LDAP authentication fails with "list index out of range" #103999
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AdrianDeWinter on GitHub (May 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13701
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.7
Ollama Version (if applicable)
No response
Operating System
Official docker image on Alpine Linux
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When the LDAP_APP_DN user can not be found (for instance due to an incorrect LDAP_SEARCH_BASE), I would expect to receive an error stating as much.
Actual Behavior
When the LDAP_APP_DN can't be found, users attempting to login receive a "LDAP authentication failed" message and the logs show
| ERROR | open_webui.routers.auths:ldap_auth:348 - LDAP authentication error: list index out of range - {}Steps to Reproduce
Logs & Screenshots
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Generating WEBUI_SECRET_KEY
Loading WEBUI_SECRET_KEY from .webui_secret_key
/app/backend/open_webui
/app/backend
/app
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
WARNI [open_webui.env]
WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
INFO [open_webui.env] Embedding model set: sentence-transformers/all-MiniLM-L6-v2
WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║█████╗ ██████╔╝██║ ██║██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║
╚██████╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝
v0.6.7 - building the best AI user interface.
https://github.com/open-webui/open-webui
Fetching 30 files: 100%|██████████| 30/30 [00:00<00:00, 53635.60it/s]
INFO: Started server process [1]
INFO: Waiting for application startup.
2025-05-08 15:03:58.685 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {}
2025-05-08 15:03:58.685 | INFO | open_webui.main:lifespan:459 - Installing external dependencies of functions and tools... - {}
2025-05-08 15:03:58.690 | INFO | open_webui.utils.plugin:install_frontmatter_requirements:185 - No requirements found in frontmatter. - {}
2025-05-08 15:03:58.996 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET / HTTP/1.1" 200 - {}
2025-05-08 15:03:59.051 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/loader.js HTTP/1.1" 200 - {}
2025-05-08 15:03:59.068 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/splash.png HTTP/1.1" 200 - {}
2025-05-08 15:03:59.205 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET / HTTP/1.1" 304 - {}
2025-05-08 15:03:59.206 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /_app/version.json HTTP/1.1" 200 - {}
2025-05-08 15:03:59.321 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/loader.js HTTP/1.1" 304 - {}
2025-05-08 15:03:59.322 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/splash.png HTTP/1.1" 304 - {}
2025-05-08 15:03:59.674 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /api/config HTTP/1.1" 200 - {}
2025-05-08 15:03:59.685 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/splash-dark.png HTTP/1.1" 200 - {}
2025-05-08 15:03:59.728 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /api/v1/auths/ HTTP/1.1" 401 - {}
2025-05-08 15:03:59.862 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/splash.png HTTP/1.1" 304 - {}
2025-05-08 15:03:59.864 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/favicon-dark.png HTTP/1.1" 200 - {}
2025-05-08 15:03:59.937 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.10.80.12:0 - "GET /static/favicon-dark.png HTTP/1.1" 304 - {}
2025-05-08 15:04:01.931 | ERROR | open_webui.routers.auths:ldap_auth:348 - LDAP authentication error: list index out of range - {}
Additional Information
The check for search_success in line 237 is apparently insufficient:
a3bb7df610/backend/open_webui/routers/auths.py (L237-L238)