Re: Get "nice" variables from POST
| From: | trlists at clayst dot com | Date: | Fri, 12 Mar 2004 03:56:23 +0000 |
| Subject: | Re: Get "nice" variables from POST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180232@lists.php.net to get a copy of this message | ||
On 11 Mar 2004 Chris Shiflett wrote:
> The risk is no greater than what the original poster wants to do anyway:
>
> $foo = $_POST['foo'];
>
> Whether $foo is created by register_globals being enabled or by the
> previous code, there is no difference in risk. The data should still be
> considered tainted until it has been properly validated, and disabling
> register_globals does not excuse you from performing this step.
I totally agree -- I certainly didn't mean to suggest otherwise.
The original question was about how to get a specific set of "about 10"
variables out of the _POST array so he wasn't always having to use
array references. One of the responses suggested using
register_globals and that's what I was responding to.
It seems to me that for security one wants both things -- first, to
move only what you need from _POST into the global symbol table, and
second, validate it thoroughly.
--
Tom