MDL-76235 core: compare email diversion exceptions case-insensitively.

Co-authored-by: Jan Kristoffer Roth <[email protected]>
This commit is contained in:
Paul Holden
2022-12-09 11:19:18 +00:00
co-authored by Jan Kristoffer Roth
parent 40a89d8a9a
commit 652b2e496a
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -5920,7 +5920,7 @@ function email_should_be_diverted($email) {
$patterns = array_map('trim', preg_split("/[\s,]+/", $CFG->divertallemailsexcept, -1, PREG_SPLIT_NO_EMPTY));
foreach ($patterns as $pattern) {
if (preg_match("/$pattern/", $email)) {
if (preg_match("/{$pattern}/i", $email)) {
return false;
}
}
+2
View File
@@ -3426,6 +3426,7 @@ EOF;
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
),
true,
),
@@ -3435,6 +3436,7 @@ EOF;
array(
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
),
false,