From 12dd7deac54d2c06e756ed8c5b0200b0d5da2009 Mon Sep 17 00:00:00 2001 From: Michcio Date: Sun, 25 Sep 2022 17:21:52 +0200 Subject: [PATCH] Remove authentication type edge case in streaming init --- packages/backend/src/server/api/streaming.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/server/api/streaming.ts b/packages/backend/src/server/api/streaming.ts index dff353c2e..8bf985fc2 100644 --- a/packages/backend/src/server/api/streaming.ts +++ b/packages/backend/src/server/api/streaming.ts @@ -16,6 +16,10 @@ export const initializeStreamingServer = (server: http.Server): void => { ws.on('request', async (request): Promise => { const q = request.resourceURL.query as ParsedUrlQuery; + if (q.i instanceof Array) { + request.reject(400); + return; + } const [user, app] = await authenticate(request.httpRequest.headers.authorization, q.i) .catch(err => {