Files
pangolin/server/internal/devices
wangjia 038e5b6ab5 fix(server): 被移除的设备会话轮询判活 —— dev 行不存在应判「失效」而非「有效」(bug)
SessionActive 在设备被 DeleteDevice 删行后 FindByUUID 返回 nil,此前一律 return true
(「未知/非本人设备不据此登出」)。结果:被移除的设备轮询 /me/session 永远拿到
active=true → 不登出、不弹框,只表现为数据面凭证被召回→隧道断→客户端误报「节点异常」。
改为:dev==nil(自身 device_id 查无此行,已登录客户端必然注册过 → 只能是被移除)→
return false,让其登出;dev.UserID!=userID(他人 uuid)仍 return true 兜底。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 01:54:53 +08:00
..