mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-27 06:46:30 -05:00
[PR #23542] [CLOSED] fix: null-check file owner, timing-safe SCIM token, GCS nested paths #130913
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23542
Author: @barry3406
Created: 4/9/2026
Status: ❌ Closed
Base:
dev← Head:fix/backend-bugs-v2📝 Commits (3)
57a7996fix: use timing-safe comparison for SCIM bearer token13e7aebfix: correct GCS filename extraction for nested paths3f6e575fix: add null check for file owner in get_html_file_content_by_id📊 Changes
3 files changed (+5 additions, -4 deletions)
View changed files
📝
backend/open_webui/routers/files.py(+1 -1)📝
backend/open_webui/routers/scim.py(+2 -1)📝
backend/open_webui/storage/provider.py(+2 -2)📄 Description
Pull Request Checklist
devbranch.dev.fix:Changelog Entry
Description
Three independent backend bug fixes found during code audit.
Fixed
get_html_file_content_by_idcrashes with 500 when accessing a file whose owner has been deleted.Users.get_user_by_id()returnsNonebut.roleis accessed without null check. Addednot file_user orguard.!=which is vulnerable to timing side-channel attacks. Replaced withhmac.compare_digest(), consistent with the existing pattern inutils/auth.py.get_fileanddelete_fileusesplit('/')[1]to extract filename, which returns the wrong segment for nested paths (e.g.gs://bucket/subdir/file.txtreturnssubdir). Changed tosplit('/')[-1], consistent with the S3 provider.Security
hmac.compare_digestto prevent timing attacksAdditional Information
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.