Skip to content

Commit ddea952

Browse files
kiannidevcursoragent
authored andcommitted
test(crypto): cover uppercase hex in timingSafeEqualHex
Lock in case-insensitive hex parsing used by webhook signature verification. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8b0ac26 commit ddea952

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/unit/crypto.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ describe("webhook signature verification", () => {
2727
expect(timingSafeEqualHex("", "00")).toBe(false);
2828
expect(timingSafeEqualHex("00", "01")).toBe(false);
2929
expect(timingSafeEqualHex("00", "00")).toBe(true);
30+
expect(timingSafeEqualHex("ABCD", "abcd")).toBe(true);
3031
});
3132

3233
it("uses timing-safe token comparisons and one-way token hashes", async () => {

0 commit comments

Comments
 (0)