fix: 登录频率限制 bug — lock_until=0 导致计数被清零

根因: 初始 lock_until=0 时 now >= 0 + 60 恒为真, 每次请求都清除计数
修复: lock_until 改用 None 表示未锁定, 仅非 None 时做过期判断

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
qinglong
2026-06-13 13:46:29 +08:00
parent a75b9d0975
commit 2f9063d6d4
3 changed files with 36 additions and 8 deletions
+9 -1
View File
@@ -1,9 +1,17 @@
http_port: 4200
last_updated: 316707.287225746
last_updated: 11552.015952154
plugin_routes:
example_plugin:
- methods:
- GET
path: /example_plugin/api/example/info
require_auth: false
- methods:
- POST
path: /example_plugin/api/plugin/echo
require_auth: true
- methods:
- POST
path: /example_plugin/api/plugin/plugin_status
require_auth: true
websocket_port: 4240