Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
/api/v2/search will always return ones own account, no matter the offset #11365
TL;DR searching for your own account breaks pagination
When I search for my own username with Search v2 api and a really high offset, I get no results.
My own account is always returned, no matter what offset I send in.
Steps to reproduce the problem
Send a search request for your own username and any offset.
Could reproduce on multiple mastodon instances, all running v2.9.2.
Hm, this is because the search endpoint will return the account matching exactly the query if there is one.
This behavior is probably not expected from users, thought, we should probably restrict the exact match logic to full handles, not just bare usernames.