Re: POST/GET into variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, January 21, 2008 10:03 am, Nathan Nobbe wrote:
> On Jan 21, 2008 10:19 AM, Eric Butera <eric.butera@xxxxxxxxx> wrote:
>
>> I don't think making a single generic function to iterate over every
>> value in the GET/POST arrays is a very good idea.  Each field on a
>> form can contain very different pieces of data that should be handed
>> quite differently.  I know you did point out that "this is just an
>> example," but nonetheless your class is intended to iterate over
>> everything with a generic solution.
>
>
> i think applying trim() to all input is appropriate.

You're wrong. :-)

There is at least one app where whitespace was significant.

It might be for integration with some weird legacy system somewhere,
but there it is.

The sanitizing of any input data HAS to know what the data is supposed
to look like, and should be as strict as possible.

No single function can handle that without some kind of meta knowledge
about the fields coming in from somewhere else.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux