mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #18400] [CLOSED] fix: Validate 'order_by' parameter in chat query to prevent AttributeError #63635
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/18400
Author: @kaiwinut
Created: 10/17/2025
Status: ❌ Closed
Base:
dev← Head:fix/archived-chats-error-handling📝 Commits (1)
f7ddc32fix: validate 'order_by' parameter in chat query📊 Changes
1 file changed (+7 additions, -3 deletions)
View changed files
📝
backend/open_webui/models/chats.py(+7 -3)📄 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. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
This PR addresses an error handling issue in the archived chats functionality. Details can be found in https://github.com/open-webui/open-webui/discussions/18383. The fix adds proper validation to check if the requested column exists before attempting to use it, returning a ValidationError instead of an AttributeError.
Added
order_byparameter in chat queriesChanged
N/A
Deprecated
N/A
Removed
N/A
Fixed
order_byparameter in chat queriesSecurity
N/A
Breaking Changes
N/A
Additional Information
Ran the same test script mentioned in https://github.com/open-webui/open-webui/discussions/18383:
Testing script:
Container logs after the fix:
Container logs before the fix:
Screenshots or Videos
N/A
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), 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.