Skip to content

Node.js based forum software built for the modern web

fix tests, and groups.join duh

barisusaklicba9ad3d60af
diff --git a/src/socket.io/groups.js b/src/socket.io/groups.js
index 1b97dad0bb..ea6148c4b7 100644
--- a/src/socket.io/groups.js
+++ b/src/socket.io/groups.js
@@ -13,6 +13,10 @@ SocketGroups.join = function(socket, data, callback) {
return callback(new Error('[[error:invalid-data]]'));
}
+ if (!parseInt(socket.uid, 10)) {
+ return callback(new Error('[[error:invalid-uid]]'));
+ }
+
if (meta.config.allowPrivateGroups !== '0') {
async.parallel({
isAdmin: async.apply(user.isAdministrator, socket.uid),