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 HTTP responses for salmon and ActivityPub inbox processing #5200

Merged
merged 3 commits into from Oct 3, 2017

Conversation

@ThibG
Copy link
Collaborator

commented Oct 3, 2017

Mastodon currently returns 202 Accepted when a request is not signed (and thus not accepted, causing a silent failure), and 201 Created otherwise (even though it's not immediately created but will be processed in a worker).

This pull request fixes that by returning 401 Unauthorized (maybe something else is better suited) and 202 Accepted respectively. It also returns some information on why the signature couldn't be verified.

@ThibG ThibG force-pushed the ThibG:http-status branch 4 times, most recently from 44da116 to b707e19 Oct 3, 2017
@ThibG ThibG force-pushed the ThibG:http-status branch from b707e19 to a4ad2f7 Oct 3, 2017
@ThibG ThibG requested a review from Gargron Oct 3, 2017
@Gargron
Gargron approved these changes Oct 3, 2017
@Gargron Gargron merged commit dfaa219 into tootsuite:master Oct 3, 2017
2 checks passed
2 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ThibG ThibG deleted the ThibG:http-status branch Oct 4, 2017
rutan added a commit to rutan/mastodon that referenced this pull request Oct 11, 2017
…uite#5200)

* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
takayamaki added a commit to takayamaki/mastodon that referenced this pull request Oct 12, 2017
…uite#5200)

* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Oct 20, 2017
…uite#5200)

* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
abcang added a commit to pixiv/mastodon that referenced this pull request Oct 12, 2018
…uite#5200)

* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.