Skip to content

Commit

Permalink
Context-sensitive XSS bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonin Steinhauser authored and steveyken committed Oct 27, 2018
1 parent 557fe23 commit 6d60bc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/tags_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def tags_for_index(model)
elsif !query.include?(hashtag)
query += " #{hashtag}"
end
out << link_to_function(tag, "crm.search_tagged('#{query}', '#{model.class.to_s.tableize}')", title: tag)
out << link_to_function(tag, "crm.search_tagged('#{escape_javascript(query)}', '#{model.class.to_s.tableize}')", title: tag)
end
end

Expand Down

0 comments on commit 6d60bc8

Please sign in to comment.