Page 1 of 1
phpbb 2.0 code snippet
Posted: Fri Mar 13, 2009 11:01 am
by thisbl00d
Code: Select all
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Hacking attempt");
}
can some one pls explain the above snippet in a detailed manner.
what is meant by the parameter 'GLOBALS' given in every associative array?
thnx
Re: phpbb 2.0 code snippet
Posted: Fri Mar 13, 2009 11:58 am
by John Cartwright
It will prevent the user from injecting global variables from $_GET and $_POST and $_COOKIE. This would only be possible with register globals on though.
You can read more about
$GLOBALs here
Re: phpbb 2.0 code snippet
Posted: Fri Mar 13, 2009 12:31 pm
by thisbl00d
John Cartwright wrote:It will prevent the user from injecting global variables from $_GET and $_POST and $_COOKIE. This would only be possible with register globals on though.
You can read more about
$GLOBALs here
ty for ur time john
but wat does the parameter passed 'GLOBALS' mean?? if i place the above condition in a new php file apache says GLOBALS is undefined
how will the above condition be true any example code?