diff options
author | thomascube <thomas@roundcube.net> | 2011-01-28 15:19:38 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-01-28 15:19:38 +0000 |
commit | 79e634040d240b9ae2f392fccc3de643035109f9 (patch) | |
tree | d26d1165506b217f707849e3d294e8d232997aad /program/include | |
parent | f6c7afd2d99fc1e61af15d0cbeaa2bc2081beaaf (diff) |
Don't block CSS styles having important keywords
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/main.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index d79ba2ca4..7f4945692 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -872,8 +872,8 @@ function rcmail_mod_css_styles($source, $container_id) $replacements = new rcube_string_replacer; // ignore the whole block if evil styles are detected - $stripped = preg_replace('/[^a-z\(:]/', '', rcmail_xss_entity_decode($source)); - if (preg_match('/expression|behavior|url\(|import/', $stripped)) + $stripped = preg_replace('/[^a-z\(:;]/', '', rcmail_xss_entity_decode($source)); + if (preg_match('/expression|behavior|url\(|import[^a]/', $stripped)) return '/* evil! */'; // remove css comments (sometimes used for some ugly hacks) |