Skip to content

Commit

Permalink
refactor: lint suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
clambin committed Apr 19, 2024
1 parent 167b402 commit ad4126a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/server/session-cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *sessionCookie) decode(secret []byte, s string) error {

mac := bin[:macSize]
calcMac := calculateMAC(secret, bin[macSize:], []byte(s))
if bytes.Compare(mac, calcMac) != 0 {
if !bytes.Equal(mac, calcMac) {
return errCookieInvalidMAC
}

Expand Down

0 comments on commit ad4126a

Please # to comment.