CGI: Assign FieldStorage values to variables

Nobody nobody at
Wed Aug 17 14:45:36 CEST 2011

On Wed, 17 Aug 2011 02:06:31 -0700, Gnarlodious wrote:

> I get a construct like this:
> form=FieldStorage(None, None, [MiniFieldStorage('name1', 'Val1'),
> MiniFieldStorage('name2', 'Val2'), MiniFieldStorage('name3', 'Val3')])
> Now how would I assign every variable name* its value?

Don't do this. It will allow the user to set any variable they wish,
not just the ones you want them to, which is a major security flaw. PHP
had this as a language feature (controlled by the register_globals
directive), and it was rightly decried as a major security flaw.

More information about the Python-list mailing list