Skip to content

Commit

Permalink
Merge pull request #3229 from samvera/flash-xss
Browse files Browse the repository at this point in the history
Don't blindly mark flash strings HTML safe
  • Loading branch information
Thomas Johnson authored Aug 31, 2018
2 parents a90c8c7 + 47e996e commit db15e71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/_flash_msg.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% if flash[type].present? %>
<div class="alert <%= flash_dom_class %> alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<%= safe_join(Array.wrap(flash[type]).map(&:html_safe), tag(:br)) %>
<%= sanitize Array.wrap(flash[type]).join(tag(:br)) %>
</div>
<% flash.delete(type) %>
<% end %>
Expand Down

0 comments on commit db15e71

Please sign in to comment.