ID: 30495
Comment by: stv at seznam dot cz
Reported By: jaakkos at mbnet dot fi
Status: Open
Bug Type: Reproducible crash
Operating System: Windows XP
PHP Version: 5.0.2
New Comment:
Is there any problem of overloading of system in recursion if user
posts big multidimenzional field for example 100 000 of depth ?
If positive there would be one parameter more for array_walk_recursive
with max_depth level indication.
Previous Comments:
------------------------------------------------------------------------
[2004-10-20 15:06:45] jaakkos at mbnet dot fi
Description:
------------
Apache server crashes when array_walk_recursive is called twice. Tested
on Apache 2.0.52 and 1.3.29 (Windows XP).
Reproduce code:
---------------
//Just for testing +
$_POST['ab'] = 'cd';
$_GET['ef'] = 'gh';
//Just for testing -
function cleanup(&$value,$key){
if (is_string($value)){
$value = trim(strip_tags($value));
get_magic_quotes_gpc() && $value = stripslashes($value);
}
}
array_walk_recursive($_POST,'cleanup');
array_walk_recursive($_GET,'cleanup');
Expected result:
----------------
Remove tags and slashes from $_POST and $_GET hashes.
Actual result:
--------------
szAppName : Apache.exe szAppVer : 2.0.52.0 szModName : unknown
szModVer : 0.0.0.0 offset : 00000000
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30495&edit=1