diff options
author | thomascube <thomas@roundcube.net> | 2011-02-03 21:21:26 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-02-03 21:21:26 +0000 |
commit | 6ec4658f7230424245a6441fc910108866be26ab (patch) | |
tree | a7a1554adcf62bfe151adb31abd3574509e1089a /tests | |
parent | 3e0e9148efdcee5ab39d9712169f4c01cfb4f48f (diff) |
Adapt test for modcss replacements
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mailfunc.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/mailfunc.php b/tests/mailfunc.php index cc26f7743..dc25f0ce4 100644 --- a/tests/mailfunc.php +++ b/tests/mailfunc.php @@ -66,9 +66,8 @@ class rcube_test_mailfunc extends UnitTestCase $this->assertPattern('/<style [^>]+>/', $html2, "Allow styles in safe mode"); $this->assertPattern('#src="http://evilsite.net/mailings/ex3.jpg"#', $html2, "Allow external images in HTML (safe mode)"); $this->assertPattern("#url\('?http://evilsite.net/newsletter/image/bg/bg-64.jpg'?\)#", $html2, "Allow external images in CSS (safe mode)"); - - $css = '<link rel="stylesheet" type="text/css" href="?_task=utils&_action=modcss&u='.urlencode('http://anysite.net/styles/mail.css').'&c=foo"'; - $this->assertPattern('#'.preg_quote($css).'#', $html2, "Filter external styleseehts with bin/modcss.php"); + $css = '<link rel="stylesheet" .+_u=tmp-[a-z0-9]+\.css.+_action=modcss'; + $this->assertPattern('#'.$css.'#Ui', $html2, "Filter (anonymized) external styleseehts with utils/modcss.inc"); } /** |