php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63100 array_walk_recursive behaves wrongly when taint enabled
Submitted: 2012-09-17 12:16 UTC Modified: 2012-09-21 06:28 UTC
From: 274611049 at qq dot com Assigned: laruence (profile)
Status: Closed Package: taint (PECL)
PHP Version: 5.3Git-2012-09-17 (Git) OS: Suse Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 274611049 at qq dot com
New email:
PHP Version: OS:

 

 [2012-09-17 12:16 UTC] 274611049 at qq dot com
Description:
------------
使用taint后,array_walk_recursive结果有误


Test script:
---------------
$a = array();
$a[0] = "tainted string" . "<>";
taint($a[0]); 

array_walk_recursive($a, create_function('&$item', '$item = htmlspecialchars($item);'));

echo $a[0];

Expected result:
----------------
tainted string&lt;&gt;

Actual result:
--------------
Warning: main(): Attempt to echo a string that might be tainted in /usr/local/taint-1.0.0/tests/012.php on line 8
tainted string<> (尖括号没有转义,而且输出了warning)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-17 15:06 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2012-09-18 02:39 UTC] laruence@php.net
-Summary: 使用taint后,array_walk_recursive结果有误 +Summary: array_walk_recursive behavior wrongly when enable taint
 [2012-09-18 02:39 UTC] laruence@php.net
change summary
 [2012-09-18 02:40 UTC] laruence@php.net
-Summary: array_walk_recursive behavior wrongly when enable taint +Summary: array_walk_recursive behaves wrongly when taint enabled
 [2012-09-21 06:28 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=327720
Log: Fixed bug #63100 (array_walk_recursive behaves wrongly when taint enabled)
 [2012-09-21 06:28 UTC] laruence@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-09-21 06:28 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 13:01:27 2024 UTC