From 385760bddade35918eea1b3136c318cbf5b20300 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 Feb 2015 12:09:54 -0500 Subject: [PATCH] #2690 --- src/socket.io/groups.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/socket.io/groups.js b/src/socket.io/groups.js index ea6148c4b7..b2b1b244ed 100644 --- a/src/socket.io/groups.js +++ b/src/socket.io/groups.js @@ -38,6 +38,10 @@ SocketGroups.leave = function(socket, data, callback) { return callback(new Error('[[error:invalid-data]]')); } + if (!parseInt(socket.uid, 10)) { + return callback(new Error('[[error:invalid-uid]]')); + } + groups.leave(data.groupName, socket.uid, callback); };