- Sanitize CSS universal selector from e-mails. Without this fix any message can play with the CSS from entire mail window or mail preview frame. Test case:

<style type="text/css">*{ background: #000; }</style>
release-0.6
vbenincasa 14 years ago
parent 254bfdc29e
commit d0b981757a

@ -1,4 +1,4 @@
<?php
<?php
/*
+-----------------------------------------------------------------------+
@ -843,7 +843,7 @@ function rcmail_mod_css_styles($source, $container_id)
$styles = preg_replace(
array(
'/(^\s*<!--)|(-->\s*$)/',
'/(^\s*|,\s*|\}\s*)([a-z0-9\._#][a-z0-9\.\-_]*)/im',
'/(^\s*|,\s*|\}\s*)([a-z0-9\._#\*][a-z0-9\.\-_]*)/im',
"/$container_id\s+body/i",
),
array(

Loading…
Cancel
Save