php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30495 Apache crashes when calling array_walk_recursive twice.
Submitted: 2004-10-20 15:06 UTC Modified: 2005-01-13 01:10 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: jaakkos at mbnet dot fi Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.0.2 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jaakkos at mbnet dot fi
New email:
PHP Version: OS:

 

 [2004-10-20 15:06 UTC] 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     

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-20 22:52 UTC] stv at seznam dot cz
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.
 [2004-12-13 15:27 UTC] jr at terragate dot net
This is a duplicate of bug 29929
 [2005-01-13 01:10 UTC] tony2001@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of #29929.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 15:01:29 2024 UTC