#50389 [Opn->Fbk]: filter_var with FILTER_SANITIZE_STRING misses ` character

From: Date: Mon, 07 Dec 2009 08:03:46 +0000
Subject: #50389 [Opn->Fbk]: filter_var with FILTER_SANITIZE_STRING misses ` character
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145466@lists.php.net to get a copy of this message
ID: 50389 Updated by: jani@php.net Reported By: aldekein at myevil dot info -Status: Open +Status: Feedback Bug Type: Filter related Operating System: Windows 7 PHP Version: 5.2.11 New Comment: Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Works fine for me. Previous Comments: ------------------------------------------------------------------------ [2009-12-04 17:43:10] aldekein at myevil dot info 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 this bug report at http://bugs.php.net/?id=50389&edit=1

« previous php.bugs (#145466) next »