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
Summary
URL-encodes the OAuth error message when constructing the redirect URL in the OIDC callback handler (backend/open_webui/utils/oauth.py, line 1709)
Without encoding, error messages containing spaces, ampersands, or other special characters produce malformed URLs that the frontend cannot parse correctly
The custom OAuth client callback handler (line 938) already correctly uses urllib.parse.quote_plus() for the same purpose; this fix brings the OIDC handler in line with that pattern
Test plan
Trigger an OAuth error (e.g., invalid credentials) and verify the redirect URL is properly encoded
Verify the frontend correctly displays the error message after redirect
Verify normal OAuth login flow still works without errors
🔄 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/22412
**Author:** [@gambletan](https://github.com/gambletan)
**Created:** 3/8/2026
**Status:** ❌ Closed
**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
## Summary
- URL-encodes the OAuth error message when constructing the redirect URL in the OIDC callback handler (`backend/open_webui/utils/oauth.py`, line 1709)
- Without encoding, error messages containing spaces, ampersands, or other special characters produce malformed URLs that the frontend cannot parse correctly
- The custom OAuth client callback handler (line 938) already correctly uses `urllib.parse.quote_plus()` for the same purpose; this fix brings the OIDC handler in line with that pattern
## Test plan
- [ ] Trigger an OAuth error (e.g., invalid credentials) and verify the redirect URL is properly encoded
- [ ] Verify the frontend correctly displays the error message after redirect
- [ ] Verify normal OAuth login flow still works without errors
---
<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/22412
Author: @gambletan
Created: 3/8/2026
Status: ❌ Closed
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
Summary
backend/open_webui/utils/oauth.py, line 1709)urllib.parse.quote_plus()for the same purpose; this fix brings the OIDC handler in line with that patternTest plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.