[PR #12481] [MERGED] fix: Improve auth error messages #22928

Closed
opened 2026-04-20 04:29:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/12481
Author: @gaby
Created: 4/5/2025
Status: Merged
Merged: 4/5/2025
Merged by: @tjbck

Base: devHead: generic-errors


📝 Commits (2)

  • b4277c7 Make auth error messages generic
  • 3245504 Fix formatting issues

📊 Changes

2 files changed (+28 additions, -14 deletions)

View changed files

📝 backend/open_webui/retrieval/utils.py (+6 -1)
📝 backend/open_webui/routers/auths.py (+22 -13)

📄 Description

Description

This pull request updates the error handling logic across various authentication endpoints to prevent sensitive internal details from being exposed to end users. Previously, detailed error messages (such as TLS configuration issues, LDAP authentication errors, and signup failures) were passed directly in HTTP responses, potentially revealing internal system details that could aid an attacker.

Generic Error Responses:

  • All endpoints now return non-specific error messages to clients. Detailed exception information is logged internally for debugging and auditing purposes, ensuring that clients only see generic error messages.

Enhanced Logging:

  • Internal errors, especially in sensitive areas like TLS setup, LDAP user creation, and external service integrations (e.g., OpenID), are logged with detailed context. This aids in troubleshooting without risking the disclosure of critical system information.

These changes help to mitigate the risk of information disclosure through error messages, aligning the project with best practices for secure error management and overall system security.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/12481 **Author:** [@gaby](https://github.com/gaby) **Created:** 4/5/2025 **Status:** ✅ Merged **Merged:** 4/5/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `generic-errors` --- ### 📝 Commits (2) - [`b4277c7`](https://github.com/open-webui/open-webui/commit/b4277c7d2e0f482defc8af14b6d22055faca97ab) Make auth error messages generic - [`3245504`](https://github.com/open-webui/open-webui/commit/324550423c5bce26080751ba8f3ef7fc2e8cb490) Fix formatting issues ### 📊 Changes **2 files changed** (+28 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/utils.py` (+6 -1) 📝 `backend/open_webui/routers/auths.py` (+22 -13) </details> ### 📄 Description ## Description This pull request updates the error handling logic across various authentication endpoints to prevent sensitive internal details from being exposed to end users. Previously, detailed error messages (such as TLS configuration issues, LDAP authentication errors, and signup failures) were passed directly in HTTP responses, potentially revealing internal system details that could aid an attacker. ### Generic Error Responses: - All endpoints now return non-specific error messages to clients. Detailed exception information is logged internally for debugging and auditing purposes, ensuring that clients only see generic error messages. ### Enhanced Logging: - Internal errors, especially in sensitive areas like TLS setup, LDAP user creation, and external service integrations (e.g., OpenID), are logged with detailed context. This aids in troubleshooting without risking the disclosure of critical system information. These changes help to mitigate the risk of information disclosure through error messages, aligning the project with best practices for secure error management and overall system security. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:29:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#22928