mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
make sure validator.escape() receives strings only
This commit is contained in:
@@ -280,7 +280,7 @@ SocketModules.chats.renameRoom = function(socket, data, callback) {
|
||||
Messaging.getUidsInRoom(data.roomId, 0, -1, next);
|
||||
},
|
||||
function (uids, next) {
|
||||
var eventData = {roomId: data.roomId, newName: validator.escape(data.newName)};
|
||||
var eventData = {roomId: data.roomId, newName: validator.escape(String(data.newName))};
|
||||
uids.forEach(function(uid) {
|
||||
server.in('uid_' + uid).emit('event:chats.roomRename', eventData);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user