aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-06-09 17:11:22 +0200
committerShadowghost <Ghost_of_Stone@web.de>2023-07-07 08:50:37 +0200
commit05d98fe24c594ae43de4cd9f54139f8b04324119 (patch)
treecbea66216a973c6e9aafe2e6f661c1de4b58fe9a /Emby.Server.Implementations/HttpServer/WebSocketManager.cs
parent46a6755e65c9587fd1ae33ee4ffdb3cd406fd72b (diff)
Enforce permissions on websocket connections
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketManager.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/WebSocketManager.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/WebSocketManager.cs b/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
index ecfb242f6..52f14b0b1 100644
--- a/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
+++ b/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
@@ -51,6 +51,7 @@ namespace Emby.Server.Implementations.HttpServer
using var connection = new WebSocketConnection(
_loggerFactory.CreateLogger<WebSocketConnection>(),
webSocket,
+ authorizationInfo,
context.GetNormalizedRemoteIP())
{
OnReceive = ProcessWebSocketMessageReceived
@@ -64,7 +65,7 @@ namespace Emby.Server.Implementations.HttpServer
await Task.WhenAll(tasks).ConfigureAwait(false);
- await connection.ProcessAsync().ConfigureAwait(false);
+ await connection.ReceiveAsync().ConfigureAwait(false);
_logger.LogInformation("WS {IP} closed", context.Connection.RemoteIpAddress);
}
catch (Exception ex) // Otherwise ASP.Net will ignore the exception