summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-21 10:21:59 +0000
committeralecpl <alec@alec.pl>2011-12-21 10:21:59 +0000
commit984ee8ce92c9293963575e1806506c4a33c2fbfc (patch)
treeaa6a4bc996228a5797f6386b4d367da9f01e3950
parent96c946ee6ced0a9a68ef251528a3f900d5a01396 (diff)
- Update tests
-rw-r--r--tests/mailfunc.php2
-rw-r--r--tests/src/BID-26800.txt3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/mailfunc.php b/tests/mailfunc.php
index d8111c7df..1b1bbdf38 100644
--- a/tests/mailfunc.php
+++ b/tests/mailfunc.php
@@ -92,7 +92,7 @@ class rcube_test_mailfunc extends UnitTestCase
function test_html_xss2()
{
$part = $this->get_html_part('src/BID-26800.txt');
- $washed = rcmail_print_body($part, array('safe' => true));
+ $washed = rcmail_html4inline(rcmail_print_body($part, array('safe' => true)), 'dabody', '', $attr, true);
$this->assertNoPattern('/alert|expression|javascript|xss/', $washed, "Remove evil style blocks");
$this->assertNoPattern('/font-style:italic/', $washed, "Allow valid styles");
diff --git a/tests/src/BID-26800.txt b/tests/src/BID-26800.txt
index 513516c09..e4e2fe795 100644
--- a/tests/src/BID-26800.txt
+++ b/tests/src/BID-26800.txt
@@ -10,13 +10,14 @@
<h1>2 test</h1>
<p>&lt;div&gt; block</p>
<div style="font-style:italic">valid css</div>
+<div style="color:red; background:url('//somedomain.com/somepath/somefile.png')">
<div style="{ left:expression( alert(&#039;expression!&#039;) ) }">
<div style="{ background:url( alert(&#039;URL!&#039;) ) }">
<h1>3 test</h1>
<p>Inject comment text</p>
<div style="{ left:exp/* */ression( alert(&#039;xss3&#039;) ) }">
-<div style="{ background:u/* */rl( alert(&#039;xssurl3&#039;) ) }">
+<div style=" background:u/* */rl( alert(&#039;xssurl3&#039;) ) ">
<h1>4 test</h1>
<p>Using reverse solid to directe the codepoint</p>