-
Notifications
You must be signed in to change notification settings - Fork 24
HYPERFLEET-1366 - refactor: remove search and order field allowlists #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -278,6 +278,11 @@ func (s *sqlGenericService) loadList(listCtx *listContext, d dao.GenericDao) *er | |
| listCtx.pagingMeta.Size = 0 | ||
| case db.IsDBConnectionError(err): | ||
| return errors.ServiceUnavailable("Database connection unavailable") | ||
| case db.IsUndefinedColumnError(err): | ||
| if listCtx.args.Search != "" || len(listCtx.args.Order) > 0 { | ||
| return errors.BadRequest("invalid field in search or order query") | ||
| } | ||
| return errors.GeneralError("Unable to list resources: %s", err) | ||
|
Comment on lines
+281
to
+285
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not classify every This still converts any undefined-column error to HTTP 400 whenever 🤖 Prompt for AI Agents |
||
| default: | ||
| return errors.GeneralError("Unable to list resources: %s", err) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.