config/config.php (~lines 138-139) defines RATE_LIMIT_DEFAULT/RATE_LIMIT_API, but middleware/RateLimitMiddleware.php never reads them (confirmed by grep — zero references to $GLOBALS['config']['RATE_LIMIT_*'] anywhere). The middleware uses its own hardcoded class constants instead (DEFAULT_LIMIT=100, API_LIMIT=60, IP_LIMIT=300, IP_API_LIMIT=120, WINDOW_SECONDS=60). These two config keys also aren't in .env.example, so there's no documented override path either.
Impact: A deployer who edits RATE_LIMIT_API in .env — a reasonable thing to try, since the key exists and looks like a legitimate tunable — sees zero effect. The actual limit can only be changed by editing the middleware's PHP constants directly, which isn't documented anywhere.
Fix: Either wire RateLimitMiddleware to actually read these config values (making them real, documented tunables — add to .env.example too), or delete the dead config keys from config.php to avoid the false impression they're configurable.
**Severity:** Medium
`config/config.php` (~lines 138-139) defines `RATE_LIMIT_DEFAULT`/`RATE_LIMIT_API`, but `middleware/RateLimitMiddleware.php` never reads them (confirmed by grep — zero references to `$GLOBALS['config']['RATE_LIMIT_*']` anywhere). The middleware uses its own hardcoded class constants instead (`DEFAULT_LIMIT=100`, `API_LIMIT=60`, `IP_LIMIT=300`, `IP_API_LIMIT=120`, `WINDOW_SECONDS=60`). These two config keys also aren't in `.env.example`, so there's no documented override path either.
**Impact:** A deployer who edits `RATE_LIMIT_API` in `.env` — a reasonable thing to try, since the key exists and looks like a legitimate tunable — sees zero effect. The actual limit can only be changed by editing the middleware's PHP constants directly, which isn't documented anywhere.
**Fix:** Either wire `RateLimitMiddleware` to actually read these config values (making them real, documented tunables — add to `.env.example` too), or delete the dead config keys from `config.php` to avoid the false impression they're configurable.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Medium
config/config.php(~lines 138-139) definesRATE_LIMIT_DEFAULT/RATE_LIMIT_API, butmiddleware/RateLimitMiddleware.phpnever reads them (confirmed by grep — zero references to$GLOBALS['config']['RATE_LIMIT_*']anywhere). The middleware uses its own hardcoded class constants instead (DEFAULT_LIMIT=100,API_LIMIT=60,IP_LIMIT=300,IP_API_LIMIT=120,WINDOW_SECONDS=60). These two config keys also aren't in.env.example, so there's no documented override path either.Impact: A deployer who edits
RATE_LIMIT_APIin.env— a reasonable thing to try, since the key exists and looks like a legitimate tunable — sees zero effect. The actual limit can only be changed by editing the middleware's PHP constants directly, which isn't documented anywhere.Fix: Either wire
RateLimitMiddlewareto actually read these config values (making them real, documented tunables — add to.env.exampletoo), or delete the dead config keys fromconfig.phpto avoid the false impression they're configurable.