Quote OWNER_NAME to handle spaces in headers
OWNER_NAME is now wrapped in double quotes to prevent issues with spaces and special characters when used in headers. This change improves reliability when passing user names containing spaces.
This commit is contained in:
parent
585fda55cc
commit
e7799e1a2c
1 changed files with 5 additions and 1 deletions
|
|
@ -301,7 +301,11 @@ class AuthService:
|
|||
if user_info.get("id"):
|
||||
global_vars["OWNER"] = user_info.get("id")
|
||||
if user_info.get("name"):
|
||||
global_vars["OWNER_NAME"] = user_info.get("name")
|
||||
# OWNER_NAME may contain spaces, which can cause issues in headers.
|
||||
# Alternative: URL-encode the owner name to preserve spaces and special characters.
|
||||
owner_name = user_info.get("name")
|
||||
if owner_name:
|
||||
global_vars["OWNER_NAME"] = str(f"\"{owner_name}\"")
|
||||
if user_info.get("email"):
|
||||
global_vars["OWNER_EMAIL"] = user_info.get("email")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue