mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-15 07:17:30 +00:00
Fix webhook signature type guard
This commit is contained in:
parent
d60ceab6c2
commit
5f331ab549
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ export function verifyCoinPayWebhook(
|
|||
const parts = signatureHeader.split(",").map((part) => part.trim());
|
||||
const timestamp = parts.find((part) => part.startsWith("t="))?.slice(2);
|
||||
const signature = parts.find((part) => part.startsWith("v1="))?.slice(3);
|
||||
if (!timestamp || !/^[0-9a-fA-F]{64}$/.test(signature)) {
|
||||
if (!timestamp || !signature || !/^[0-9a-fA-F]{64}$/.test(signature)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue