Skip to content

Commit 2f5c7fa

Browse files
Antonin Steinhausersteveyken
authored andcommitted
Context-sensitive XSS bugfix.
1 parent 38a7f85 commit 2f5c7fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/tags_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def tags_for_index(model)
1717
elsif !query.include?(hashtag)
1818
query += " #{hashtag}"
1919
end
20-
out << link_to_function(tag, "crm.search_tagged('#{query}', '#{model.class.to_s.tableize}')", title: tag)
20+
out << link_to_function(tag, "crm.search_tagged('#{escape_javascript(query)}', '#{model.class.to_s.tableize}')", title: tag)
2121
end
2222
end
2323

0 commit comments

Comments
 (0)