I like smileys
Testing Code
[code:1]function checkInputArray( &$array, $globalise=false ) {
static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' );
foreach ($array as $key => $value) {
$intval = intval( $key );
// PHP GLOBALS injection bug
$failed = in_array( strtolower( $key ), $banned );
// PHP Zend_Hash_Del_Key_Or_Index bug
$failed |= is_numeric( $key );
if ($failed) {
die( 'Illegal variable
' . implode( ' or
', $banned ) . ' passed to script.' );
}
if ($globalise) {
$GLOBALS[$key] = $value;
}
}
}[/code:1]