Forum Moderators: coopster
Even that I test for exist and empty.
I temporarily killed SELF and point to an update script but it is not as “elegant”, any other options?
It was mentioned in the security thread as well as the presentation from the security conference I went to. PHP_SELF is not to be trusted and not used.
I have never used it and I always split my processing scripts from my presentation. This doesn't mean I split all of my html and my php code, as that is a pet peeve of mine when people do that, I just prefer all my processing in the background.
I think the actual point is IF you are using PHP_SELF or REQUEST_URI, etc. you still need to scrub the data as it is user-supplied. Since they are $_SERVER variables a lot of folk just tend to think that the data is safe.
The conversation jatar_k and I then had was whether or not we should be using full URI's in the action attribute. And using the same form for HTML and processing is a whole new discussion ;-)