equal
deleted
inserted
replaced
1852 // Vulnerability from ha.ckers.org/xss.html: |
1852 // Vulnerability from ha.ckers.org/xss.html: |
1853 // <script src="http://foo.com/xss.js" |
1853 // <script src="http://foo.com/xss.js" |
1854 // < |
1854 // < |
1855 // The rule is so specific because everything else will have been filtered by now |
1855 // The rule is so specific because everything else will have been filtered by now |
1856 $html = preg_replace('/<(script|iframe)(.+?)src=([^>]*)</i', '<\\1\\2src=\\3<', $html); |
1856 $html = preg_replace('/<(script|iframe)(.+?)src=([^>]*)</i', '<\\1\\2src=\\3<', $html); |
|
1857 |
|
1858 // Vulnerability reported by fuzion from nukeit.org: |
|
1859 // XSS in closing HTML tag style attribute |
|
1860 // Fix: escape all closing tags with non-whitelisted characters |
|
1861 $html = preg_replace('!</((?:.*)([^a-z0-9-_:]+)(?:.*))>!', '</\\1>', $html); |
1857 |
1862 |
1858 // Restore stripped comments |
1863 // Restore stripped comments |
1859 $i = 0; |
1864 $i = 0; |
1860 foreach ( $comment_match[0] as $comment ) |
1865 foreach ( $comment_match[0] as $comment ) |
1861 { |
1866 { |