Which superglobals are affected by magic_quotes_gpc = 1?

H2_Oasis

New Member
By looking at the name of this directive one may think that \[code\]magic_quotes\[/code\] are only applied to \[code\]$_GET\[/code\], \[code\]$_POST\[/code\] and \[code\]$_COOKIE\[/code\] superglobals but there is one perturbing comment on the PHP Manual:\[quote\] Please note, that when \[code\]magic_quotes_gpc\[/code\] is set not only \[code\]$_POST\[/code\], \[code\]$_GET\[/code\], \[code\]$_REQUEST\[/code\], \[code\]$_COOKIE\[/code\] arrays values are slashed. Actually every string value in \[code\]$GLOBALS\[/code\] array is slashed, ie. \[code\]$GLOBALS['_SERVER']['PATH_INFO']\[/code\] (or \[code\]$_SERVER['PATH_INFO']\[/code\]).\[/quote\]Can anyone confirm that this is true? Are the superglobals \[code\]$GLOBALS\[/code\], \[code\]$_SERVER\[/code\], \[code\]$_FILES\[/code\], \[code\]$_SESSION\[/code\] and \[code\]$_ENV\[/code\] affected as well?One more question, if I iterate \[code\]stripslashes()\[/code\] over the \[code\]$_GET\[/code\], \[code\]$_POST\[/code\] and \[code\]$_COOKIE\[/code\] arrays do I also need to iterate through the \[code\]$_REQUEST\[/code\] array? Or are the changes automatically reflected?
 
Back
Top