mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-23 02:33:21 +00:00
Better error response to malformed headers (#35278)
This commit is contained in:
parent
71b2120e5c
commit
8ee6cee36e
4 changed files with 30 additions and 0 deletions
|
|
@ -64,6 +64,9 @@ module SignatureVerification
|
|||
return (@signed_request_actor = actor) if signed_request.verified?(actor)
|
||||
|
||||
fail_with! "Verification failed for #{actor.to_log_human_identifier} #{actor.uri}"
|
||||
rescue Mastodon::MalformedHeaderError => e
|
||||
@signature_verification_failure_code = 400
|
||||
fail_with! e.message
|
||||
rescue Mastodon::SignatureVerificationError => e
|
||||
fail_with! e.message
|
||||
rescue *Mastodon::HTTP_CONNECTION_ERRORS => e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue