Caporegime
Here is something I only found out today.. some of you may have been aware, but I am certain quite a lot are not.
http://blog.phpdoc.info/archives/13-XSS-Woes.html
Moral of the story - don't trust the $_SERVER superglobal
An example:
Create a file, call it test.php:
(I did so in my doc root on localhost)
Then access it with the following url:
http://localhost/test.php/%22%3E%3Cscript%3Ealert('xss')%3C/script%3E%3Cfoo
Anything unusual happen?
http://blog.phpdoc.info/archives/13-XSS-Woes.html
Moral of the story - don't trust the $_SERVER superglobal
An example:
Create a file, call it test.php:
Code:
<?php
echo $_SERVER['PHP_SELF'];
?>
(I did so in my doc root on localhost)
Then access it with the following url:
http://localhost/test.php/%22%3E%3Cscript%3Ealert('xss')%3C/script%3E%3Cfoo
Anything unusual happen?