MDL-9233 denied and allowed email address domains are not matched correctly

This commit is contained in:
skodak
2007-04-21 20:06:56 +00:00
parent 18d8136e88
commit 9170670188
+2 -2
View File
@@ -3683,7 +3683,7 @@ function email_is_not_allowed($email) {
if (!$allowedpattern) {
continue;
}
if (strpos(strrev($email), strrev($allowedpattern)) === 0) { // Match! (bug 5250)
if (strpos(strrev($email), strrev('@'.$allowedpattern)) === 0) { // Match! (bug 5250)
return false;
}
}
@@ -3696,7 +3696,7 @@ function email_is_not_allowed($email) {
if (!$deniedpattern) {
continue;
}
if (strpos(strrev($email), strrev($deniedpattern)) === 0) { // Match! (bug 5250)
if (strpos(strrev($email), strrev('@'.$deniedpattern)) === 0) { // Match! (bug 5250)
return get_string('emailnotallowed', '', $CFG->denyemailaddresses);
}
}