[PR #20750] [CLOSED] fix: URL-encode OAuth client secrets to handle special characters #64619

Closed
opened 2026-05-06 10:15:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20750
Author: @YuriNachos
Created: 1/17/2026
Status: Closed

Base: devHead: fix-20733-oauth-url-encoding


📝 Commits (1)

  • e4768a7 fix: URL-encode OAuth client secrets to handle special characters

📊 Changes

1 file changed (+6 additions, -6 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -6)

📄 Description

Description

  • Fixes #20733 - OAuth client secrets with special characters fail authentication

Added

  • N/A

Changed

  • Applied urllib.parse.quote() with safe='' to all OAuth provider client secrets

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • OAuth authentication: Fixed client secrets containing special characters (e.g., +) causing authentication failures
  • Special characters like + were not properly URL-encoded before being sent to the IdP
  • In application/x-www-form-urlencoded format, + is interpreted as space
  • Now all OAuth providers properly encode client secrets:
    • OAUTH_CLIENT_SECRET (OIDC)
    • GOOGLE_CLIENT_SECRET
    • MICROSOFT_CLIENT_SECRET
    • GITHUB_CLIENT_SECRET
    • FEISHU_CLIENT_SECRET

Security

  • N/A

Breaking Changes

  • N/A

Additional Information

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/20750 **Author:** [@YuriNachos](https://github.com/YuriNachos) **Created:** 1/17/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-20733-oauth-url-encoding` --- ### 📝 Commits (1) - [`e4768a7`](https://github.com/open-webui/open-webui/commit/e4768a7c532d8855809873274714b7f96ceb0ca8) fix: URL-encode OAuth client secrets to handle special characters ### 📊 Changes **1 file changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -6) </details> ### 📄 Description ### Description - Fixes #20733 - OAuth client secrets with special characters fail authentication ### Added - N/A ### Changed - Applied `urllib.parse.quote()` with `safe=''` to all OAuth provider client secrets ### Deprecated - N/A ### Removed - N/A ### Fixed - **OAuth authentication**: Fixed client secrets containing special characters (e.g., `+`) causing authentication failures - Special characters like `+` were not properly URL-encoded before being sent to the IdP - In `application/x-www-form-urlencoded` format, `+` is interpreted as space - Now all OAuth providers properly encode client secrets: - OAUTH_CLIENT_SECRET (OIDC) - GOOGLE_CLIENT_SECRET - MICROSOFT_CLIENT_SECRET - GITHUB_CLIENT_SECRET - FEISHU_CLIENT_SECRET ### Security - N/A ### Breaking Changes - N/A --- ### Additional Information - Issue: #20733 - Example: `helloworld+1234` is now properly encoded as `helloworld%2B1234` - Fixes OAuth login failures when client secrets contain special characters ### Contributor License Agreement 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>
GiteaMirror added the pull-request label 2026-05-06 10:15:28 -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#64619