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

Co-authored-by: Jan Kristoffer Roth <roth@dhbw-mosbach.de>
This commit is contained in:
Paul Holden 2022-11-08 20:57:57 +00:00
parent 40a89d8a9a
commit 652b2e496a
2 changed files with 3 additions and 1 deletions

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;
}
}

View File

@ -3426,6 +3426,7 @@ EOF;
'foo@example.com',
'test@real.com',
'fred.jones@example.com',
'Fred.Jones@Example.com',
),
true,
),
@ -3435,6 +3436,7 @@ EOF;
array(
'dev1@dev.com',
'fred@example.com',
'Fred@Example.com',
'fred+verp@example.com',
),
false,