Add test for #6410

pull/6414/head
Aleksander Machniak 6 years ago
parent adcac3b9de
commit 0dee528adb

@ -75,6 +75,7 @@ class MailFunc extends PHPUnit_Framework_TestCase
$this->assertNotRegExp('/src="skins/', $washed, "Remove local references");
$this->assertNotRegExp('/\son[a-z]+/', $washed, "Remove on* attributes");
$this->assertNotContains('onload', $washed, "Handle invalid style");
$html = rcmail_html4inline($washed, array('container_id' => 'foo'));
$this->assertNotRegExp('/onclick="return rcmail.command(\'compose\',\'xss@somehost.net\',this)"/', $html, "Clean mailto links");

@ -18,5 +18,7 @@ Have a nice Christmas time.<br />
Thomas
</p>
<html><svg><style><//><body onload=alert(1)>
</body>
</html>

Loading…
Cancel
Save