Skip to content

Commit

Permalink
Buffer from body
Browse files Browse the repository at this point in the history
  • Loading branch information
omBratteng committed Oct 29, 2023
1 parent a9b8e10 commit 45d730a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/api/hooks/tailscale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function verifyWebhookSignature<T>(req: NextApiRequest, body: string): T[] | Err
const mac = createHmac('sha256', secret)
mac.update(timestamp.toString())
mac.update('.')
mac.update(body)
mac.update(Buffer.from(body))
const want = mac.digest('hex')

// Verify that the signatures match.
Expand Down

0 comments on commit 45d730a

Please sign in to comment.