security - Filter PHP's $_SERVER['PHP_SELF'] -
I have to filter the incredible $ _SERVER ['PHP_SELF'] varialbe whether this is a good way:
Function Filters ($ str) {$ phpself = basename (__ file__); $ Str = substr ($ str, 0, stropo ($ str, $ phpself)) $ Phpself; Return $ unsafe STR; } Where is $ str $ _SERVER ['PHP_SELF']?
1) Your code will cause an error.
2) $ _ server ['PHP_SELF'] is not unsafe. Its insecure use is unsafe.
Comments
Post a Comment