1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-21 18:03:18 +01:00

[ticket/security/235] Use whitespace instead of word boundary regex to remove wildcards

This fixes removing the wildcard in the following search query: *.test
SECURITY-235
This commit is contained in:
Derky 2019-04-26 00:52:43 +02:00
parent fd195fba21
commit 8a73eb5f0f

View File

@ -306,7 +306,7 @@ class fulltext_native extends \phpbb\search\base
}
// Remove non trailing wildcards from each word to prevent a full table scan (it's now using the database index)
$match = '#\*(?!$)\b#';
$match = '#\*(?!$|\s)#';
$replace = '$1';
$keywords = preg_replace($match, $replace, $keywords);