fix(auth): 发码防刷改为按成功计数 + 新增每设备每日发码上限 #136
Reference in New Issue
Block a user
Delete Branch "fix/sms-send-quota-count-success"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
→ 正常用户连点重发可能被误锁 1 小时。改为「先判后记、只对成功发码计数」:
check 判在真发之前(超限直接 429、不真发),record 只在 send_code 成功后调;
被单号冷却 / 供应商失败抛 429 时直接返回、不计数。
均按成功计数,叠一层日封顶挡低频长时间轰炸。
(peek/commit 拆分);原子的 enforce_rate_limit 仍保留给登录爆破(失败也计)不变。
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com