mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #13313] [CLOSED] fix(auth): handle missing 'exp' in token to avoid TypeError #23152
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/13313
Author: @athoik
Created: 4/29/2025
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (1)
7036ec3fix(auth): handle missing 'exp' in token to avoid TypeError📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/auths.py(+1 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Previously, the session validation logic assumed the 'exp' field was always present in the decoded JWT. If it was missing, this led to a TypeError when comparing
int(time.time()) > expires_at.This patch adds a check to ensure 'expires_at' is not None before the comparison, preventing the runtime error.
Fixes crash observed in commit
45ad6776de.Added
Changed
Deprecated
Removed
Fixed
Fixes crash observed in commit
45ad6776de.Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, 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.