WebApp Sec mailing list archives

PHP and "Register_Globals"


From: "Ulrich P." <spam () wir-sind org>
Date: Sat, 29 Mar 2003 18:57:42 +0100

hello,

newer php-versions have set "register_globals" to "off" by default. i programmed a huge php-project during the last year and didn't start using the global POST and GET-arrays, so if a form contains <input type=text name=age> if use $age in my scripts.

I soon realized the security issues, and wrote my own validation-functions, ... to handle all the XSS and SQL-injection problems.

my question is now: my app is 'safe', but what do I do if my future webhost has register_globals to 'off'?

would it be possible to write a script that registers the whole POST-array as single variables? simply as it used to be in 'older' PHP-versions?

any ideas welcome :)


regards,

Ulrich


Current thread: