various modifications to prevent xss

- validation of names and labels against /^[\w\s\'\-]*$/i
- html entities encoding

git-svn-id: http://redmine.rubyforge.org/svn/trunk@99 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2006-12-17 08:10:18 +00:00
1 parent 3e28dc669b
commit 2b86ef8e28
34 files changed
+73 -112

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@ top = headers_heigth + 8
@issues.each do |i| %>
<div style="position: absolute;line-height:1em;height:16px;top:<%= top %>px;left:4px;width:<%= subject_width - 5 %>px;overflow:hidden;">
<small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>:
<%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
<%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
</div>
<% top = top + 20
end %>