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

Change unauthenticated search to not support pagination in REST API #19326

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Oct 9, 2022

  • Only support search queries with 5 or more characters
  • Do not support queries with offset (pagination)
  • Return HTTP 401 on truthy resolve instead of overriding to false

@Gargron Gargron added the api REST API, Streaming API, Web Push API label Oct 9, 2022
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very welcome and necessary change overall, but I left some inline comments that I think need to be addressed.

app/controllers/api/v2/search_controller.rb Outdated Show resolved Hide resolved
app/controllers/api/v2/search_controller.rb Outdated Show resolved Hide resolved
@Gargron Gargron force-pushed the fix-limit-unauthenticated-search-api branch from 8a31d2d to 8291ace Compare October 21, 2022 11:33
@Gargron Gargron force-pushed the fix-limit-unauthenticated-search-api branch from 8291ace to e73c109 Compare October 25, 2022 23:55
- Only exact search matches for queries with < 5 characters
- Do not support queries with `offset` (pagination)
- Return HTTP 401 on truthy `resolve` instead of overriding to false
@Gargron Gargron force-pushed the fix-limit-unauthenticated-search-api branch from e73c109 to 85b9310 Compare October 26, 2022 00:05
@Gargron Gargron merged commit 1ae508b into main Oct 26, 2022
@Gargron Gargron deleted the fix-limit-unauthenticated-search-api branch October 26, 2022 10:18
kadoshita pushed a commit to kadoshita/mastodon that referenced this pull request Nov 19, 2022
…astodon#19326)

- Only exact search matches for queries with < 5 characters
- Do not support queries with `offset` (pagination)
- Return HTTP 401 on truthy `resolve` instead of overriding to false
nametoolong pushed a commit to nametoolong/nuage that referenced this pull request Nov 20, 2022
…astodon#19326)

- Only exact search matches for queries with < 5 characters
- Do not support queries with `offset` (pagination)
- Return HTTP 401 on truthy `resolve` instead of overriding to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants