Skip to content

fix: use constant-time comparison for token signature verification - #932

Open
oasilturk wants to merge 1 commit into
MartialBE:mainfrom
oasilturk:constant-time-token-verify
Open

fix: use constant-time comparison for token signature verification#932
oasilturk wants to merge 1 commit into
MartialBE:mainfrom
oasilturk:constant-time-token-verify

Conversation

@oasilturk

Copy link
Copy Markdown

Replace bytes.Equal with hmac.Equal when verifying the user token HMAC signature.

hmac.Equal performs the comparison without leaking timing information and is the idiomatic choice for MAC verification in Go. No new import is required because crypto/hmac is already used in this file.

This is a small defense-in-depth hardening change. I don't think it represents a practical vulnerability.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

@oasilturk is attempting to deploy a commit to the martialbe's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant