From ef6c3b0029894bd72edfe57c77ee08b746a8868d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 2 Dec 2020 19:04:07 -0500 Subject: [PATCH] fix: check uid as well --- src/socket.io/uploads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/uploads.js b/src/socket.io/uploads.js index 9355a8ac71..b248868fbd 100644 --- a/src/socket.io/uploads.js +++ b/src/socket.io/uploads.js @@ -15,7 +15,7 @@ uploads.upload = async function (socket, data) { 'user.updateCover': socketUser.updateCover, 'groups.cover.update': socketGroup.cover.update, }; - if (!data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) { + if (!socket.uid || !data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) { throw new Error('[[error:invalid-data]]'); }