Skip to content

Commit

Permalink
[ticket/security/235] Use whitespace instead of word boundary regex t…
Browse files Browse the repository at this point in the history
…o remove wildcards

This fixes removing the wildcard in the following search query: *.test
SECURITY-235
  • Loading branch information
Derky committed Apr 25, 2019
1 parent fd195fb commit 8a73eb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpBB/phpbb/search/fulltext_native.php
Expand Up @@ -306,7 +306,7 @@ public function split_keywords($keywords, $terms)
}

// 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);

Expand Down

0 comments on commit 8a73eb5

Please sign in to comment.