mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #18646] [CLOSED] fix(auth): Decode trusted name header to support non-ASCII usernames #11662
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/18646
Author: @JungJunYong
Created: 10/27/2025
Status: ❌ Closed
Base:
dev← Head:fix-auth-decode📝 Commits (1)
83fef0cfix(auth): Decode trusted name header to support non-ASCII usernames📊 Changes
1 file changed (+9 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/auths.py(+9 -1)📄 Description
Description
This PR fixes an issue where usernames containing non-ASCII characters (e.g., Korean, Japanese, Cyrillic) were displayed incorrectly during trusted header authentication.
The name would appear as a raw URL-encoded string (like
%ED%99%8D...) instead of the actual characters (e.g.,홍길동).How it was fixed
The problem occurred because the backend was reading the
WEBUI_AUTH_TRUSTED_NAME_HEADERvalue directly without decoding it.This fix introduces
urllib.parse.unquoteto the sign-in logic. This correctly decodes the header value, converting any URL-encoded sequences back into their original characters before assigning the name to the user.This ensures usernames in all languages are displayed correctly while still allowing for safe transport of non-ASCII characters in HTTP headers.
contributor license agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.