mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20744
Author: @YuriNachos
Created: 1/17/2026
Status: ❌ Closed
Base:
main← Head:fix-oauth-client-secret-url-encoding📝 Commits (4)
f84aad5fix: handle None value for model capabilities in builtin_tools check0d4898ffix: handle None value for model capabilities in file_context check9772be0fix: handle None value for capabilities in get_model_capability helper3d404fffix: URL-encode OAuth client secrets to handle special characters📊 Changes
3 files changed (+11 additions, -13 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -6)📝
backend/open_webui/utils/middleware.py(+4 -6)📝
backend/open_webui/utils/tools.py(+1 -1)📄 Description
Summary
Fixes #20733
When OAuth client secrets contain special characters like
+, authentication fails withinvalid_client: Client authentication failedRoot Cause
In
application/x-www-form-urlencodedPOST requests, the+character is interpreted as a space. Theclient_secret_postmethod doesn't URL-encode the secret value before sending it to the IdP.Example:
helloworld+1234becomeshelloworld 1234(with space)Changes
backend/open_webui/config.pyquote as urlquoteimport fromurllib.parseurllib.parse.quote()withsafe=''to ALL OAuth client secrets:OAUTH_CLIENT_SECRET(OIDC/OpenID Connect)GOOGLE_CLIENT_SECRETMICROSOFT_CLIENT_SECRETGITHUB_CLIENT_SECRETFEISHU_CLIENT_SECRETsafe=''ensures ALL special characters are encoded (e.g.,+becomes%2B)Test
The fix handles:
Example:
helloworld+1234→ sent ashelloworld%2B1234to IdPChecklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.