fix sa mall possible xss in personImage handlebar helpers if the attacker had access to your root domain. fixes #3392

This commit is contained in:
Maxwell Salzberg 2012-06-16 14:59:51 -07:00
parent ab28c53626
commit d3487c8b7d

View file

@ -22,5 +22,5 @@ Handlebars.registerHelper('personImage', function(person, size, imageClass) {
size = (typeof(size) != "string" ? "small" : size); size = (typeof(size) != "string" ? "small" : size);
imageClass = (typeof(imageClass) != "string" ? size : imageClass); imageClass = (typeof(imageClass) != "string" ? size : imageClass);
return "<img src=\"" + person.avatar[size] +"\" class=\"avatar " + imageClass + "\" title=\"" + person.name +"\" />"; return "<img src=\"" + person.avatar[size] +"\" class=\"avatar " + imageClass + "\" title=\"" + _.escape(person.name) +"\" />";
}) })