Skip to content
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

Crash with invalid integer value for gt_last_modified #3402

Closed
leplatrem opened this issue Apr 4, 2024 · 0 comments · Fixed by #3425
Closed

Crash with invalid integer value for gt_last_modified #3402

leplatrem opened this issue Apr 4, 2024 · 0 comments · Fixed by #3425
Labels

Comments

@leplatrem
Copy link
Contributor

For example:

querystring = {
    _sort: "last_modified",
    gt_last_modified: "171103608603432920249' or '7127'='7127"
}

crashes with

DataError (psycopg2.errors.NumericValueOutOfRange) value "171103608603432920249' or '7127'='7127" is out of range for type bigint
LINE 7:             AND as_epoch(last_modified) > '17110360860343292...

We should check here that integer is passed:

if field == self.model.modified_field and value == "":
raise_invalid(self.request, **error_details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant