Make email address denying work a little more rigorously. bug 5250
This commit is contained in:
+2
-2
@@ -4069,7 +4069,7 @@ function email_is_not_allowed($email) {
|
||||
if (!$allowedpattern) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($email, $allowedpattern) !== false) { // Match!
|
||||
if (strpos(strrev($email), strrev($allowedpattern)) === 0) { // Match! (bug 5250)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -4082,7 +4082,7 @@ function email_is_not_allowed($email) {
|
||||
if (!$deniedpattern) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($email, $deniedpattern) !== false) { // Match!
|
||||
if (strpos(strrev($email), strrev($deniedpattern)) === 0) { // Match! (bug 5250)
|
||||
return get_string('emailnotallowed', '', $CFG->denyemailaddresses);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user