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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: whatthejeff@php.net
New email:
PHP Version: OS:

 

 [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: Thu Nov 21 13:01:29 2024 UTC