Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdiallam committed Nov 7, 2024
1 parent 2cac8bc commit 23c2854
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions op-txproxy/auth_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ func (h *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

if caller != crypto.PubkeyToAddress(*sigPubKey) {
h.log.Info("invalid auth header", "header", authHeader, "err", mismatchedRecoveredSignerErr)
recoveredSigner := crypto.PubkeyToAddress(*sigPubKey)
if caller != recoveredSigner {
h.log.Info("invalid auth header", "header", authHeader, "err", mismatchedRecoveredSignerErr, "signer", recoveredSigner)
newCtx := context.WithValue(r.Context(), authContextKey{}, &AuthContext{common.Address{}, mismatchedRecoveredSignerErr})
h.next.ServeHTTP(w, r.WithContext(newCtx))
return
Expand Down

0 comments on commit 23c2854

Please sign in to comment.