fix: check uid as well

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 7e867cf95e
commit ef6c3b0029

@ -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]]');
}

Loading…
Cancel
Save