Skip to content

Commit

Permalink
fix: minor change for hmac sig validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilkumar1612 committed Oct 10, 2024
1 parent 2d0d3d0 commit 8ec81b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/utils/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function verifySignature(signature: string, data: string, timestamp: stri
// unauthorize signature if signed before 10s or signed in future.
const now = Date.now();
if(
now > parseInt(timestamp) ||
now < parseInt(timestamp) ||
now - parseInt(timestamp) > 10000
) {
return false;
Expand Down

0 comments on commit 8ec81b3

Please sign in to comment.