Bug #62395 [NEW]: str_replace重写有误

From: Date: Fri, 22 Jun 2012 14:01:02 +0000
Subject: Bug #62395 [NEW]: str_replace重写有误
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9532@lists.php.net to get a copy of this message
From: 274611049 at qq dot com Operating system: suse linux PHP version: 5.3.14 Package: taint Bug Type: Bug Bug description:str_replace重写有误 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 bug report at https://bugs.php.net/bug.php?id=62395&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62395&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62395&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62395&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62395&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62395&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62395&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62395&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62395&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62395&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62395&r=support Expected behavior: https://bugs.php.net/fix.php?id=62395&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62395&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62395&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62395&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62395&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62395&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62395&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62395&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62395&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62395&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62395&r=mysqlcfg

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