PHP security
From Arnout Engelen
[edit] Sessions
Session fixation is a problem.
Example vulnerable app:
Explanation of the problem:
Explanation of the solution:
- ....?
[edit] register_globals
Register_globals is baaaaad. PHP code should not rely on it, and even deny service if it's on.
Example vulnerable app:
Explanation of the problem:
Solution
- turn it off in php.ini
- don't turn it on in .htaccess
- write your scripts to check it's off:
if (@ini_get('register_globals'))
{
print 'Turn off register_globals. It is a serious security hazard. See <a href="http://www.php.net/register_globals">this page</a> for more info.';
exit(0);
}
