fix: expire websocket admin sessions

This commit is contained in:
sagitchu
2026-05-14 01:24:03 +08:00
parent bd13477fa3
commit 583a3834f9
2 changed files with 25 additions and 0 deletions
+3
View File
@@ -642,6 +642,9 @@ func (s *Server) validateAdminSession(userID int64, claims auth.Claims) bool {
if s == nil {
return false
}
if claims.Exp <= time.Now().Unix() {
return false
}
if s.getUserAuthState == nil {
return true
}