Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F12490691
Washtml.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
720 B
Referenced Files
None
Subscribers
None
Washtml.php
View Options
<?php
/**
* Test class to test rcube_washtml class
*
* @package Tests
*/
class
Framework_Washtml
extends
PHPUnit_Framework_TestCase
{
/**
* Test the elimination of some XSS vulnerabilities
*/
function
test_html_xss3
()
{
// #1488850
$html
=
'<p><a href="data:text/html,<script>alert(document.cookie)</script>">Firefox</a>'
.
'<a href="vbscript:alert(document.cookie)">Internet Explorer</a></p>'
;
$washer
=
new
rcube_washtml
;
$washed
=
$washer
->
wash
(
$html
);
$this
->
assertNotRegExp
(
'/data:text/'
,
$washed
,
"Remove data:text/html links"
);
$this
->
assertNotRegExp
(
'/vbscript:/'
,
$washed
,
"Remove vbscript: links"
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Oct 20, 12:13 AM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1545771
Default Alt Text
Washtml.php (720 B)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment