escape data on room enter

This commit is contained in:
barisusakli
2015-03-20 13:46:05 -04:00
parent 7dde229517
commit c8e0eab34e

View File

@@ -70,6 +70,10 @@ SocketMeta.rooms.enter = function(socket, data, callback) {
socket.currentRoom = data.enter;
if (data.enter.indexOf('topic') !== -1) {
data.uid = socket.uid;
data.picture = validator.escape(data.picture);
data.username = validator.escape(data.username);
data.userslug = validator.escape(data.userslug);
websockets.in(data.enter).emit('event:user_enter', data);
}
}