Edit report at https://bugs.php.net/bug.php?id=60876&edit=1
ID: 60876 Updated by: ras...@php.net Reported by: jiri dot reischig at ecn dot cz Summary: max_input_vars corrupt posted data -Status: Open +Status: Not a bug Type: Bug Package: *General Issues PHP Version: 5.3.9 Block user comment: N Private report: N New Comment: Generally max_input_vars would be set such that it is way above what any normal script would expect to receive, so I am not sure this is a real concern. If you really do have scripts that take thousands of GET/POST variables, you will need to increase this setting and do some input validation. This isn't any different from when you didn't have this limit. At these levels there are various arbitrary browser and server limits that could be cutting this off without PHP's knowledge, so again proper input validation is the only right answer here. Previous Comments: ------------------------------------------------------------------------ [2012-01-30 11:49:40] jiri dot reischig at ecn dot cz 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. ------------------------------------------------------------------------ [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