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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -