diff --git a/src/groups.js b/src/groups.js index 462a0854a8..12d1c3a307 100644 --- a/src/groups.js +++ b/src/groups.js @@ -642,6 +642,10 @@ var async = require('async'), callback = callback || function() {}; + if (!parseInt(uid, 10)) { + return callback(new Error('[[error:invalid-uid]]')); + } + Groups.exists(groupName, function(err, exists) { if (err) { return callback(err);