php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69202 FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used
Submitted: 2015-03-09 07:49 UTC Modified: -
From: whatthejeff@php.net Assigned:
Status: Closed Package: Filter related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-03-09 07:49 UTC] whatthejeff@php.net
Description:
------------
FILTER_FLAG_STRIP_BACKTICK is ignored unless FILTER_FLAG_STRIP_LOW or FILTER_FLAG_STRIP_HIGH is used.

Test script:
---------------
var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK));
var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK));
var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK));

Expected result:
----------------
string(3) "abc"
string(3) "abc"
string(3) "abc"


Actual result:
--------------
string(9) "``a`b`c``"
string(3) "abc"
string(3) "abc"


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-09 09:25 UTC] laruence@php.net
Automatic comment on behalf of whatthejeff@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=66a2c528fe29c1af2c98e67acaa4b900cd57496d
Log: Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used.
 [2015-03-09 09:25 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-03-09 09:25 UTC] laruence@php.net
Automatic comment on behalf of whatthejeff@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fdbdb1151457a59bc6598de4b98b12aa522b4134
Log: Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used.
 [2016-07-20 11:39 UTC] davey@php.net
Automatic comment on behalf of whatthejeff@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fdbdb1151457a59bc6598de4b98b12aa522b4134
Log: Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC