Skip to content

Commit

Permalink
fix: http interceptor token valid
Browse files Browse the repository at this point in the history
  • Loading branch information
cody.meng committed Dec 16, 2024
1 parent 6047b41 commit f6bb8c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/corehttp/corehttp_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ func tokenCheckInterceptor(r *http.Request, n *core.IpfsNode) error {
}
claims, err := utils.VerifyToken(token, string(password))
if err != nil {
return err
return ErrInvalidToken
}

if claims.PeerId != n.Identity.String() {
return ErrInvalidToken
}
Expand Down

0 comments on commit f6bb8c9

Please sign in to comment.