[ticket/13713] Escape special characters in preg_replace

PHPBB3-13713
This commit is contained in:
lavigor 2018-06-21 03:20:46 +03:00 committed by Marc Alexander
parent 659928f042
commit c6e9f001e3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -124,7 +124,7 @@ abstract class base_group implements source_interface
// Grab group data // Grab group data
$groups = $this->get_groups(); $groups = $this->get_groups();
$matches = preg_grep('/^' . $keyword . '.*/i', $groups['names']); $matches = preg_grep('/^' . preg_quote($keyword) . '.*/i', $groups['names']);
$group_ids = array_intersect($group_ids, array_flip($matches)); $group_ids = array_intersect($group_ids, array_flip($matches));
$names = []; $names = [];