summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-10 01:33:58 +0000
committerthomascube <thomas@roundcube.net>2011-12-10 01:33:58 +0000
commit854397b216463d77561b8adadf880c3fbbcb8885 (patch)
treeb4d6668a0babad435dd9862c8d3109b18a54a336 /program/steps/mail
parent67e0c90fceb91d8b6c94275f96e6f1b80a9362bc (diff)
Better CSS url() validation
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index a0a4dcab7..2bc0091cb 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -834,8 +834,8 @@ function rcmail_washtml_callback($tagname, $attrib, $content, $washtml)
$stripped = preg_replace('/[^a-zA-Z\(:;]/', '', rcmail_xss_entity_decode($content));
// now check for evil strings like expression, behavior or url()
- if (!preg_match('/expression|behavior/i', $stripped)) {
- if (!$washtml->get_config('allow_remote') && preg_match('/url\(|import[^a]/i', $stripped))
+ if (!preg_match('/expression|behavior|javascript:|import[^a]/i', $stripped)) {
+ if (!$washtml->get_config('allow_remote') && stripos($stripped, 'url('))
$washtml->extlinks = true;
else
$out = html::tag('style', array('type' => 'text/css'), $content);