Skip to content

Commit

Permalink
Fixed missing XSS mitigation (see #2817)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Dec 15, 2021
1 parent fd589de commit f62bba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html/textroomtest.js
Expand Up @@ -351,7 +351,7 @@ function sendPrivateMsg(username) {
text: JSON.stringify(message),
error: function(reason) { bootbox.alert(reason); },
success: function() {
$('#chatroom').append('<p style="color: purple;">[' + getDateString() + '] <b>[whisper to ' + display + ']</b> ' + result);
$('#chatroom').append('<p style="color: purple;">[' + getDateString() + '] <b>[whisper to ' + display + ']</b> ' + escapeXmlTags(result));
$('#chatroom').get(0).scrollTop = $('#chatroom').get(0).scrollHeight;
}
});
Expand Down

1 comment on commit f62bba6

@P0cas
Copy link

@P0cas P0cas commented on f62bba6 Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Please sign in to comment.