Skip to content

fix: close three rate-limit bypasses (#198) - #200

Merged
jrosskopf merged 1 commit into
mainfrom
fix/gh-198-rate-limit
Oct 4, 2026
Merged

jrosskopf merged 1 commit into
mainfrom
fix/gh-198-rate-limit

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Reproduced against a real binary first.

Summary

  • Method-blind lookup: POST /items (limited) was never limited when GET /items had no limit. Lookup is now by path and method.
  • Per-id buckets: /items/:id got a fresh bucket per id; now one per route.
  • Rotating credentials: key: user hashed the unverified Authorization header, so rotating invalid tokens minted fresh buckets. Every such request now also counts against its client IP (10x the per-user limit).

Test plan

  • test_rate_limit_bypasses.py: 5 tests, 3 failed before (POST all 201, 6 ids all 200, 80 bad credentials all 401)
  • the five existing rate-limit suites + tavern (27) and C++ unit green

Refs #198 (SQL identifier quoting, unused cache keys, REST persistence parity, debug-log context dump, remote-config boot, readiness race remain)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

… bucket, IP backstop for user keys (#198)

- Look the endpoint up by path and method
- Bucket on the configured route, not the literal request path
- key user/user-or-ip also counts against the client IP (10x ceiling)
- Real-binary tests: 5 cases, 3 failed before
- Refs #198 (other items remain)
@jrosskopf
jrosskopf merged commit ccc587f into main Oct 4, 2026
9 checks passed
@jrosskopf
jrosskopf deleted the fix/gh-198-rate-limit branch October 4, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant