Bug #60876 [Opn]: max_input_vars corrupt posted data

From: Date: Mon, 30 Jan 2012 11:49:40 +0000
Subject: Bug #60876 [Opn]: max_input_vars corrupt posted data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-166957@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60876&edit=1

 ID:                 60876
 User updated by:    jiri dot reischig at ecn dot cz
 Reported by:        jiri dot reischig at ecn dot cz
 Summary:            max_input_vars corrupt posted data
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 PHP Version:        5.3.9
 Block user comment: N
 Private report:     N

 New Comment:

I think that halt the execution is good option because there are o lot of existing scripts that do
not have any handling warnings and when the script don't halt scripts got corrupted data
without any information about it. So corrupted data was stored to the database for example.


Previous Comments:
------------------------------------------------------------------------
[2012-01-25 17:29:53] carloschilazo at gmail dot com

I'm not sure as it would have to absolutley halt the execution; 

Some routines maybe in the script to handle those kind of situations, hence only a 
warning is issued

------------------------------------------------------------------------
[2012-01-25 10:03:16] jiri dot reischig at ecn dot cz

Description:
------------
When you post some data to the php script where are more variables than limit in max_input_vars the
php script does not get any information that php don't put any of data to the system variables
(for example $_REQUEST[]).
There is only "PHP Warning" generated but the php script is still running without any
problem with corrupted dataset from post.

Solution will be to stop executing the script if max_input_vars is reached.

Without stoping the script you are working with currupted dataset and you can make some data
inconsistencies in your aplication without any knowledge.

Test script:
---------------
max_input_vars = 1

sending post: test.php?a=1&b=2&c=3

print_r($_REQUEST);

Expected result:
----------------
Stop the script if max_input_vars is reached.


Actual result:
--------------
Array
(
    [a] => 1
)


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60876&edit=1


Thread (4 messages)

« previous php.bugs (#166957) next »