Add error handling for no signature request.

This commit is contained in:
Naoki Kosaka 2018-11-10 00:35:59 +09:00
parent 91700a6049
commit 9a77f07db1

View File

@ -20,7 +20,10 @@ func decodeActivity(r *http.Request) (*activitypub.Activity, *activitypub.Actor,
r.Body.Read(body)
// Verify HTTPSignature
verifier, _ := httpsig.NewVerifier(r)
verifier, err := httpsig.NewVerifier(r)
if err != nil {
return nil, nil, nil, err
}
KeyID := verifier.KeyId()
remoteActor, err := activitypub.RetrieveActor(KeyID)
if err != nil {