From 98e7860a68b40d801ebb47b4fcc444b56fb3bf3a Mon Sep 17 00:00:00 2001 From: Andreas Venizelou Date: Fri, 8 Mar 2024 14:27:42 +0200 Subject: [PATCH] Minor bug fixed --- Protest/Front/personalize.js | 12 ++++++------ Protest/Http/Auth.cs | 2 +- Protest/Tools/Monitor.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Protest/Front/personalize.js b/Protest/Front/personalize.js index 32298cf7..f0bdec11 100644 --- a/Protest/Front/personalize.js +++ b/Protest/Front/personalize.js @@ -16,15 +16,15 @@ class Personalize extends Tabs { this.chatTab = this.AddTab("Chat", "mono/chat.svg"); this.agentTab = this.AddTab("Agent", "mono/agent.svg"); - this.guiTab.onclick = ()=> this.ShowGui(); - this.regionTab.onclickTab = ()=> this.ShowRegion(); - this.sessionTab.onclick = ()=> this.ShowSession(); - this.chatTab.onclick = ()=> this.ShowChat(); - this.agentTab.onclick = ()=> this.ShowAgent(); + this.guiTab.onclick = ()=> this.ShowGui(); + this.regionTab.onclick = ()=> this.ShowRegion(); + this.sessionTab.onclick = ()=> this.ShowSession(); + this.chatTab.onclick = ()=> this.ShowChat(); + this.agentTab.onclick = ()=> this.ShowAgent(); switch (this.params) { case "region": - thr.classNameTab = "v-tab-selected"; + this.regionTab.className = "v-tab-selected"; this.ShowRegion(); break; diff --git a/Protest/Http/Auth.cs b/Protest/Http/Auth.cs index 7c6d49dd..efff60c2 100644 --- a/Protest/Http/Auth.cs +++ b/Protest/Http/Auth.cs @@ -254,7 +254,7 @@ private static HashSet PopulateAccessPath(string[] accessList) { path.Add("/lifeline/disk/view"); path.Add("/lifeline/diskusage/view"); path.Add("/ws/livestats/device"); - path.Add("/ws/ws/monitor"); + path.Add("/ws/monitor"); break; case "manage users:write": diff --git a/Protest/Tools/Monitor.cs b/Protest/Tools/Monitor.cs index a59bc603..4027b757 100644 --- a/Protest/Tools/Monitor.cs +++ b/Protest/Tools/Monitor.cs @@ -219,7 +219,7 @@ public static async void WebSocketHandler(HttpListenerContext ctx) { while (ws.State == WebSocketState.Open) { WebSocketReceiveResult receiveResult = await ws.ReceiveAsync(new ArraySegment(buff), CancellationToken.None); - if (!Auth.IsAuthenticatedAndAuthorized(ctx, "")) { + if (!Auth.IsAuthenticatedAndAuthorized(ctx, "/ws/monitor")) { await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, null, CancellationToken.None); return; }