diff options
Diffstat (limited to 'apps/web/src/app/api/waitlist/route.ts')
| -rw-r--r-- | apps/web/src/app/api/waitlist/route.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/web/src/app/api/waitlist/route.ts b/apps/web/src/app/api/waitlist/route.ts index 031ebd5a..076dd228 100644 --- a/apps/web/src/app/api/waitlist/route.ts +++ b/apps/web/src/app/api/waitlist/route.ts @@ -135,10 +135,7 @@ async function validateCSRFToken(request: NextRequest): Promise<boolean> { const tokenTime = parseInt(timestamp);
if (now - tokenTime > TOKEN_EXPIRY) return false;
- const expectedSignature = crypto
- .createHmac("sha256", env.BETTER_AUTH_SECRET || "fallback-secret")
- .update(`${token}:${timestamp}`)
- .digest("hex");
+ const expectedSignature = crypto.createHmac("sha256", env.BETTER_AUTH_SECRET).update(`${token}:${timestamp}`).digest("hex");
return signature === expectedSignature;
}
|
