Thanks for taking a look at this:
I'm currently cleaning up $_POST vars like this:
if ( is_array( $POST ))
{
foreach ( $POST as $key => $value )
{
$post_vars[ trim(strip_tags( $key )) ] = trim(strip_tags( $value ));
}
}
THE QUESTION:
I'm wondering if there's a malicious code risk in the foreach statement. Could I do it like this to avoid that risk:
if ( is_array( $POST ))
{
foreach ( $POST as trim(strip_tags( $key )) => trim(strip_tags( $value )))
{
$post_vars[ $key ] = $value;
}
}
Can I turn on a PHP option to automatically strip_tags from $POST, $GET, $_COOKIES ?? I'm running PHP 4.3.3.
Thanks for any help,
Christopher