diff --git a/internal/nodes/session_manager.go b/internal/nodes/session_manager.go index 4eaa5bc5..9cad35d8 100644 --- a/internal/nodes/session_manager.go +++ b/internal/nodes/session_manager.go @@ -40,6 +40,7 @@ func (this *SessionManager) Read(sid string) map[string]string { resp, err := rpcClient.LoginSessionRPC().FindLoginSession(rpcClient.Context(0), &pb.FindLoginSessionRequest{Sid: sid}) if err != nil { logs.Println("SESSION", "read '"+sid+"' failed: "+err.Error()) + result["@error"] = err.Error() return result } diff --git a/internal/web/helpers/user_must_auth.go b/internal/web/helpers/user_must_auth.go index 39d787e3..b66c9933 100644 --- a/internal/web/helpers/user_must_auth.go +++ b/internal/web/helpers/user_must_auth.go @@ -170,6 +170,11 @@ func (this *userMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam var adminId = session.GetInt64("adminId") if adminId <= 0 { + var errString = session.GetString("@error") + if len(errString) > 0 { + action.WriteString("read session failed: " + errString) + return false + } this.login(action) return false }