diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-21 20:45:33 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-21 20:45:33 +0200 |
commit | 05f5a0e270ce2cde4ff242634033c902c58f13ea (patch) | |
tree | 3832b37a6d1b1992bbed1d869f2dd6d3fcf0f218 /lib/coderay/encoders/html | |
parent | 65983f38eaed758a9901adf9e4e8c4be3e3a6123 (diff) | |
download | coderay-05f5a0e270ce2cde4ff242634033c902c58f13ea.tar.gz |
no cache attacks possible, static input (CSS)
Diffstat (limited to 'lib/coderay/encoders/html')
-rw-r--r-- | lib/coderay/encoders/html/css.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html/css.rb b/lib/coderay/encoders/html/css.rb index de98f0e..164d7f8 100644 --- a/lib/coderay/encoders/html/css.rb +++ b/lib/coderay/encoders/html/css.rb @@ -21,7 +21,6 @@ module Encoders end def get_style_for_css_classes css_classes - # FIXME: cache attack cl = @styles[css_classes.first] return '' unless cl style = '' @@ -53,7 +52,6 @@ module Encoders for selector in selectors.split(',') classes = selector.scan(/[-\w]+/) cl = classes.pop - # FIXME: cache attack @styles[cl] ||= Hash.new @styles[cl][classes] = style.to_s.strip.delete(' ').chomp(';') end |