SECURITY: self XSS by admin by editing badge name

This commit is contained in:
Sam 2014-04-23 09:46:32 +10:00
parent 6538874064
commit 8abf652dc3

View file

@ -93,7 +93,7 @@ Discourse.HTML = {
html += "data-drop-close=\"true\" class=\"badge-category" + (restricted ? ' restricted' : '' ) +
extraClasses + "\" ";
name = Handlebars.Utils.escapeExpression(name);
// Add description if we have it
if (description) html += "title=\"" + Handlebars.Utils.escapeExpression(description) + "\" ";