mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
Enforce permissions on websocket connections
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user