IFrame

', // '
<iframe src="path/to/file.html"></iframe>

IFrame

' '

IFrame

' ), // expression array( '
', '
' ), // no quotes and no semicolon - http://ha.ckers.org/xss.html array( '', '' ), // embedded encoded tab to break up XSS - http://ha.ckers.org/xss.html array( '', '' ), // issue 178 array( '', 'invalid.jpg' ), // issue 534 array( '*/" onerror="console.log(\'Yet another XSS\')">', 'as"df dummy=*/" onerror="console.log(\'Yet another XSS\')">' ), // issue 602 array( 'test', '' ), // issue #1813 https://github.com/xpressengine/xe-core/issues/1813 array( 'dummy', 'dummy' ), array( 'dummy', 'dummy' ), array( "\"dummy\"", 'dummy' ), array( "\"dummy\"", 'dummy' ) ); } /** * @dataProvider provider */ public function testXss($source, $expected) { $result = removeHackTag($source); $this->assertEquals($result, $expected); } }