mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Fixed EmailValidator`to prevent false-positives checks
Fixed EmailValidator`to prevent false-positives checks when property `checkDns` is set to `true` Fixes #12714
This commit is contained in:
@ -7,6 +7,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #4113: Error page stacktrace was generating links to private methods which are not part of the API docs (samdark)
|
||||
- Bug #9796: Initialization of not existing `yii\grid\ActionColumn` default buttons (arogachev)
|
||||
- Bug #12681: Changed `data` column type from `text` to `blob` to handle null-byte (`\0`) in serialized RBAC rule properly (silverfire)
|
||||
- Bug #12714: Fixed `yii\validation\EmailValidator` to prevent false-positives checks when property `checkDns` is set to `true` (silverfire)
|
||||
- Bug #12791: Fixed `yii\behaviors\AttributeTypecastBehavior` unable to automatically detect `attributeTypes`, triggering PHP Fatal Error (klimov-paul)
|
||||
- Bug #12803, #12921: Fixed BC break in `yii.activeForm.js` introduced in #11999. Reverted commit 3ba72da (silverfire)
|
||||
- Bug #12810: Fixed `yii\rbac\DbManager::getChildRoles()` and `yii\rbac\PhpManager::getChildRoles()` throws an exception when role has no child roles (mysterydragon)
|
||||
|
||||
@ -96,7 +96,7 @@ class EmailValidator extends Validator
|
||||
} else {
|
||||
$valid = preg_match($this->pattern, $value) || $this->allowName && preg_match($this->fullPattern, $value);
|
||||
if ($valid && $this->checkDNS) {
|
||||
$valid = checkdnsrr($matches['domain'], 'MX') || checkdnsrr($matches['domain'], 'A');
|
||||
$valid = checkdnsrr($matches['domain'] . '.', 'MX') || checkdnsrr($matches['domain'] . '.', 'A');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user