Bug #62395 [Asn->Csd]: str_replace重写有误

From: Date: Sat, 23 Jun 2012 09:33:30 +0000
Subject: Bug #62395 [Asn->Csd]: str_replace重写有误
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9536@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62395&edit=1 ID: 62395 Updated by: laruence@php.net Reported by: 274611049 at qq dot com Summary: str_replace重写有误 -Status: Assigned +Status: Closed Type: Bug Package: taint Operating System: suse linux PHP Version: 5.3.14 Assigned To: laruence Block user comment: N Private report: N New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: ------------------------------------------------------------------------ [2012-06-23 09:27:38] laruence@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=326308 Log: Fixed Bug #62395 (str_replace重写有误) ------------------------------------------------------------------------ [2012-06-22 16:27:21] laruence@php.net 谢谢指出这个问题, 我会尽快修复. ------------------------------------------------------------------------ [2012-06-22 14:01:01] 274611049 at qq dot com Description: ------------ 函数原型为: string str_replace(mixed $search, mixed $replace, mixed $subject [, int &$count]) 需要跟踪的参数为$subject 和 $replace 而不是$search 和 $replace Test script: --------------- <?php $a = "tainted string" . "."; taint($a); //must use concat to make the string not a internal string(introduced in 5.4) $b = str_replace("str", "btr", $a); var_dump(is_tainted($b)); ?> Expected result: ---------------- bool(true) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62395&edit=1

« previous php.pecl.dev (#9536) next »