Fix: auto-revoke forged license passcodes and stop auth log flooding
A trial user's serial was alternating between the built-in trial passcode (authorized) and a forged 50-year/1000-host passcode (rejected) on every heartbeat. ShouldLogAuth keyed its throttle on the serial alone and logged every status flip, so the rate limit was defeated and the master log filled with alternating success/failure lines. ShouldLogAuth now tracks the success and failure states independently per serial and source IP: each logs on first sight and then at most once per hour, with a bounded cache. Keying only by serial would collapse the many normal trial users that share one serial into a single line. AutoRevokeForgedAuth handles the offending connection itself. Integrity failures (V1 codes 2/3, V2 code 4) are counted per connection context, and three within 60 seconds send the same days=0 CMD_AUTHORIZATION as the manual "revoke authorization" menu, with a 10-minute cooldown. It acts only when the same serial also had a successful auth in the last two minutes, which is the observed abuse pattern; a batch of failures after a password rotation or a client pointed at another master has no success event and is left alone. Expired and already-revoked licences never trigger it. Without a configured super password it only warns. Translations added. Debug x64 server builds; not runtime-tested. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
e265527610
commit
a32219f05c
5 files changed
+186
-20
No files matched your search
@@ -1576,6 +1576,8 @@ IP %s DLL
|
||||
V1 授权失败: = V1-Autorisierung fehlgeschlagen:
|
||||
V2 授权成功: = V2 autorisiert:
|
||||
V2 授权失败: = V2-Autorisierung fehlgeschlagen:
|
||||
使用伪造口令,已自动撤销授权=Gefaelschter Lizenzcode; Autorisierung automatisch widerrufen
|
||||
检测到伪造口令,但未配置超管密码,无法自动撤销=Gefaelschter Lizenzcode erkannt, aber Super-Passwort ist nicht gesetzt; automatischer Widerruf nicht moeglich
|
||||
|
||||
监听端口和文件下载服务端口冲突!=Abhoerport steht im Konflikt mit dem Dateiserver-Port!
|
||||
|
||||
|
||||
@@ -1580,6 +1580,8 @@ IP %s DLL
|
||||
V1 授权失败: = V1 authorization failed:
|
||||
V2 授权成功: = V2 authorized:
|
||||
V2 授权失败: = V2 authorization failed:
|
||||
使用伪造口令,已自动撤销授权=Forged passcode; authorization auto-revoked
|
||||
检测到伪造口令,但未配置超管密码,无法自动撤销=Forged passcode detected, but super password is not configured; cannot auto-revoke
|
||||
|
||||
监听端口和文件下载服务端口冲突!=Listen port is conflict with file server port!
|
||||
|
||||
|
||||
@@ -1572,6 +1572,8 @@ IP %s DLL
|
||||
V1 授权失败: = V1 授權失敗:
|
||||
V2 授权成功: = V2 授權成功:
|
||||
V2 授权失败: = V2 授權失敗:
|
||||
使用伪造口令,已自动撤销授权=使用偽造口令,已自動撤銷授權
|
||||
检测到伪造口令,但未配置超管密码,无法自动撤销=偵測到偽造口令,但未設定超管密碼,無法自動撤銷
|
||||
|
||||
监听端口和文件下载服务端口冲突!=监听端口和文件下载服务端口冲突!
|
||||
|
||||
|
||||
Reference in new issue
Block a user