check domain blocks way earlier on

This commit is contained in:
tsmethurst 2021-06-30 14:22:46 +02:00
commit 5bf7b46cf4
19 changed files with 255 additions and 77 deletions

View file

@ -119,7 +119,7 @@ func (f *federator) AuthenticatePostInbox(ctx context.Context, w http.ResponseWr
return nil, false, fmt.Errorf("could not fetch requested account with username %s: %s", username, err)
}
publicKeyOwnerURI, authenticated, err := f.AuthenticateFederatedRequest(requestedAccount.Username, r)
publicKeyOwnerURI, authenticated, err := f.AuthenticateFederatedRequest(ctx, requestedAccount.Username)
if err != nil {
l.Debugf("request not authenticated: %s", err)
return ctx, false, err