mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 02:42:24 +03:00
The fail-closed gate added in #13262 authorized a presented key by row EXISTENCE (getApiKeyMetadata); a revoked/deactivated/banned/expired key still has a row and ran the sweep (CWE-613). The route now also requires validateApiKey() — the one lifecycle gate — before choosing a scope, and neither an unresolved nor an invalid key falls through to the session branch. Both 401 bodies now go through buildErrorBody() (Hard Rule #12). Found by the omni-code-sec battery on #12969 (SEC-B, SEC-E, SEC-F); 4 negative route tests added (revoked, deactivated, banned, expired — the last one alongside a session cookie). Refs #12969