mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: check uid as well
This commit is contained in:
@@ -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]]');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user