#50389 [NEW]: filter_var with FILTER_SANITIZE_STRING misses ` character

From: Date: Fri, 04 Dec 2009 17:43:10 +0000
Subject: #50389 [NEW]: filter_var with FILTER_SANITIZE_STRING misses ` character
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145426@lists.php.net to get a copy of this message
From: aldekein at myevil dot info Operating system: Windows 7 PHP version: 5.2.11 PHP Bug Type: Filter related Bug description: filter_var with FILTER_SANITIZE_STRING misses ` character Description: ------------ I try to sanitize: Bug: "'` I get: Bug: \"\'` The ` character is not sanitized. Why? Reproduce code: --------------- echo filter_var("\"'`", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); or echo filter_var("\"'`", FILTER_SANITIZE_STRING); Expected result: ---------------- \"\'\� 00 = code for ` character. Actual result: -------------- \"\'` -- Edit bug report at http://bugs.php.net/?id=50389&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50389&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50389&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50389&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50389&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50389&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50389&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50389&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50389&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50389&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50389&r=support Expected behavior: http://bugs.php.net/fix.php?id=50389&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50389&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50389&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50389&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50389&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50389&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50389&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50389&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50389&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50389&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50389&r=mysqlcfg

« previous php.bugs (#145426) next »