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