mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
escape data on room enter
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user