Add test for #6410

pull/6465/head
Aleksander Machniak 6 years ago
parent 102fbf1169
commit 095cd2fa8a

@ -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, '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