mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[PR #23648] [MERGED] fix: drop extra='allow' on FolderForm and FolderUpdateForm #27300
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/23648
Author: @Classic298
Created: 4/12/2026
Status: ✅ Merged
Merged: 4/13/2026
Merged by: @tjbck
Base:
dev← Head:fix/folder-form-mass-assignment📝 Commits (2)
c0847d3fix: drop extra='allow' on FolderForm and FolderUpdateForm27f1b53fix: reject unknown fields on FolderForm and FolderUpdateForm📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/open_webui/models/folders.py(+2 -2)📄 Description
These request models were configured to accept arbitrary extra fields, which were then merged into the folder row via form_data.model_dump(). In insert_new_folder the server-assigned user_id is placed before the form spread, so a client-supplied user_id in the request body would override it and the folder would be persisted against another account.
Strictly typed inputs are the correct shape for these endpoints — the client has no legitimate reason to send fields beyond the declared ones, and dropping extra='allow' closes the mass-assignment sink at the validation layer instead of relying on every callsite to merge fields in the right order.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.