mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
Fix double escaping in AFPData::keywordLike()
If we don't map '\-' and '\+' to themselves, the leading slash gets escaped, and the resultant pattern only matches a literal slash. Bug: 67670 Change-Id: Ifa1e3edd6f41985a3bb97bfb1497985f8fa64af5
This commit is contained in:
parent
d239ab117f
commit
0e36b728e3
|
@ -73,6 +73,8 @@ class AFPData {
|
|||
// Derived from <http://www.php.net/manual/en/function.fnmatch.php#100207>
|
||||
private static $wildcardMap = array(
|
||||
'\*' => '.*',
|
||||
'\+' => '\+',
|
||||
'\-' => '\-',
|
||||
'\.' => '\.',
|
||||
'\?' => '.',
|
||||
'\[' => '[',
|
||||
|
|
|
@ -1 +1 @@
|
|||
"foobér" like "foob?r" & "quux" matches "qu*x"
|
||||
"f+oo-bér" like "f+oo-b?r" & "quux" matches "qu*x"
|
||||
|
|
Loading…
Reference in a new issue