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

Fix searching for additional hashtags in hashtag column #17054

Merged
merged 1 commit into from Nov 26, 2021

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Nov 26, 2021

The search API requires a valid token with read or read:search scopes, but the code for hashtag searches does not pass down the authentication token to the API module.

This used to work before #16171 (so it still works in every release so far) because the API module would actually copy the Authorization header to the csrfHeader object on previous API calls.

This PR passes the state to the API module so it can use the proper token.

Note that I am not completely sure about the performance implications of passing the state this way, although I suspect they are minor as the state object should be shared across the whole application anyway.

@ClearlyClaire ClearlyClaire marked this pull request as draft November 26, 2021 13:00
@ClearlyClaire
Copy link
Contributor Author

Marking it as a draft while I investigate the cause of the regression.

@ClearlyClaire
Copy link
Contributor Author

The regression is caused by #16171 which used to mutate the csrfHeader with the authorization token from previous API calls, and now doesn't.

@Gargron Gargron merged commit 3f382e3 into mastodon:main Nov 26, 2021
jesseplusplus pushed a commit to jesseplusplus/decodon that referenced this pull request Feb 10, 2022
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.

None yet

2 participants