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

Handle negative offset param in api/v2/search #28282

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

mjankowski
Copy link
Contributor

As alternative to #28256 this catches the offset error more narrowly just within the search controller, and returns 400 when invalid value present.

I put this directly in search because it's the most specific case ... but probably, this should actually live in the API::Base controller class? I guess the question there is can we safely assume that everywhere across the api that a params[:offset] is present, we want to check its value this way?

@mjankowski mjankowski force-pushed the api-param-error-targeted branch from 6ecbd5b to 5a52e18 Compare December 11, 2023 16:02
@ClearlyClaire ClearlyClaire added this pull request to the merge queue Dec 19, 2023
Merged via the queue into mastodon:main with commit c28976d Dec 19, 2023
26 checks passed
@mjankowski mjankowski deleted the api-param-error-targeted branch December 19, 2023 13:28
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants