Highsrc/auth.ts:20security
Removed use of `timingSafeEqual` for constant-time comparison.
The original code used `timingSafeEqual` to prevent timing attacks. Direct string comparison can be vulnerable if the `sign` function is not deterministic.
ConfirmedThe comparison now uses `===` instead of `timingSafeEqual`. This means that if `sign(value, secret)` and `signature` are not exactly the same, the function will return false. The original `timingSafeEqual` ensured constant-time comparison to prevent timing attacks, but this check directly compares the buffers, which could be vulnerable.