mirror of
https://github.com/Sea-Haven-Industries/seahaven-door-unlock-api.git
synced 2026-09-30 07:03:12 +00:00
Replace plain token !== secrets.authToken checks in the unlock and lockdown handlers with crypto.timingSafeEqual, guarding for unequal buffer lengths first (timingSafeEqual throws on different lengths). Prevents timing side-channel leakage of the auth token. Handler signatures, event shape, and return contract are unchanged. |
||
|---|---|---|
| .. | ||
| lockdown-handler.ts | ||