Commit Graph
2 Commits
Author SHA1 Message Date

2026-10-02

lezi-fun 1ff6eb13e6 fix: return 400 for malformed JSON bodies (entity.parse.failed)
body-parser 的 JSON 解析失败之前会掉进通用 500 处理;现在明确返回
400 'JSON 格式无效',并把对应的测试断言收紧为精确匹配。
2026-10-02 12:58:56 +08:00

2026-09-22

OrbisAI SecurityandClaude Sonnet 5 381b98bf1f fix: split auth rate limiter into independent per-IP and per-account buckets
authLimiter was mounted before express.json()/urlencoded(), so its
keyGenerator read req.body while it was still unparsed, and combining IP
with a client-controlled account value into one key let an attacker rotate
the account to get a fresh bucket per request, bypassing the per-IP limit.
Replace it with authIpLimiter (unchanged position, IP-only key) and
authAccountLimiter (mounted after body parsing, account-only key), so
neither counter can be bypassed by manipulating the other's input.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 18:28:09 +05:30