mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-15 23:22:59 +08:00
GET /api/v1/keys/:id previously returned distinct HTTP status codes for 'key not found' (404) vs 'key exists but belongs to another user' (403). This oracle allowed attackers to enumerate valid API key IDs by observing response differences. Now returns 404 in both cases so the response is identical regardless of whether a key exists. Fixes: CWE-204 (Information Disclosure via ID Oracle)