Disable textile inline styles to prevent XSS attacks (#2377).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2192 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-28 13:38:34 +00:00
parent a140c9bd74
commit 35f5e36838
3 changed files with 4 additions and 3 deletions
+1 -2
View File
@@ -470,8 +470,7 @@ class RedCloth3 < String
style << "vertical-align:#{ v_align( $& ) };" if text =~ A_VLGN
end
style << "#{ htmlesc $1 };" if not filter_styles and
text.sub!( /\{([^}]*)\}/, '' )
style << "#{ htmlesc $1 };" if text.sub!( /\{([^}]*)\}/, '' ) && !filter_styles
lang = $1 if
text.sub!( /\[([^)]+?)\]/, '' )
@@ -30,6 +30,7 @@ module Redmine
super
self.hard_breaks=true
self.no_span_caps=true
self.filter_styles=true
end
def to_html(*rules, &block)