Files
NestQuest/api
overseer 42a205b4bd Admin auth: constant-time panel-token comparison in require_admin
Fixes review finding P2: require_admin compared the Bearer credential
against config.panel_token with Python ==, which short-circuits and is
not constant-time. Compare with secrets.compare_digest on UTF-8 bytes
instead — the same pattern require_panel_token already uses for this
exact secret — keeping the truthiness guard on config.panel_token and
the same 403 rejection detail and behaviour.
2026-09-23 00:55:15 -04:00
..