8e81e9d fix: URL-encode OAuth error message in redirect URL
📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝backend/open_webui/utils/oauth.py (+1 -1)
📄 Description
Description
In the OAuth error handling flow, the error message was inserted directly into the redirect URL without URL-encoding. When the error message contained special characters (spaces, ampersands, etc.), it produced a malformed redirect URL that could break the redirect or lose parts of the error message.
Fixed
URL-encoded the OAuth error message before inserting it into the redirect URL, ensuring the redirect works correctly regardless of special characters in the error message.
Additional Information
Tested by reviewing the code path and verifying the fix addresses the issue
Self-reviewed the code changes
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 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/22415
**Author:** [@gambletan](https://github.com/gambletan)
**Created:** 3/8/2026
**Status:** ✅ Merged
**Merged:** 3/8/2026
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix/oauth-error-url-encode`
---
### 📝 Commits (1)
- [`8e81e9d`](https://github.com/open-webui/open-webui/commit/8e81e9dd030187c65e5fd12b86a2cbd696e8ff47) fix: URL-encode OAuth error message in redirect URL
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/utils/oauth.py` (+1 -1)
</details>
### 📄 Description
### Description
- In the OAuth error handling flow, the error message was inserted directly into the redirect URL without URL-encoding. When the error message contained special characters (spaces, ampersands, etc.), it produced a malformed redirect URL that could break the redirect or lose parts of the error message.
### Fixed
- URL-encoded the OAuth error message before inserting it into the redirect URL, ensuring the redirect works correctly regardless of special characters in the error message.
### Additional Information
- Tested by reviewing the code path and verifying the fix addresses the issue
- Self-reviewed the code changes
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22415
Author: @gambletan
Created: 3/8/2026
Status: ✅ Merged
Merged: 3/8/2026
Merged by: @tjbck
Base:
dev← Head:fix/oauth-error-url-encode📝 Commits (1)
8e81e9dfix: URL-encode OAuth error message in redirect URL📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/oauth.py(+1 -1)📄 Description
Description
Fixed
Additional Information
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.