mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-09 13:28:46 -05:00
[PR #23513] [CLOSED] fix: remove undefined cookie_expires from OAuth session cookie #42859
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/23513
Author: @rapartlu
Created: 4/8/2026
Status: ❌ Closed
Base:
main← Head:fix/oauth-session-cookie-expires📝 Commits (1)
4b2caacFix: remove undefined cookie_expires from OAuth session cookie📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/oauth.py(+1 -1)📄 Description
Bug
handle_callback in oauth.py (line 1686) references cookie_expires when setting the oauth_session_id cookie, but this variable is never defined. This causes a NameError that silently prevents OAuth sessions from being stored server-side.
Error: Failed to store OAuth session server-side: name 'cookie_expires' is not defined
This breaks:
Fix
Remove cookie_expires from the dict spread. cookie_max_age (which IS defined at line 1627) is sufficient and is the standard way to set cookie expiry. All other set_cookie calls in the same function correctly use only cookie_max_age.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.