removed dnsbl from email validation.
This commit is contained in:
parent
0d15c0cb15
commit
a7ba2df17a
|
@ -12,10 +12,10 @@
|
||||||
class Validate
|
class Validate
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Static function for validating email addresses with multiple secure levels and blacklist.
|
* Static function for validating email addresses with multiple secure levels and black- and whitelist.
|
||||||
* @param string $email email address
|
* @param string $email email address
|
||||||
* @param int $level secure level
|
* @param int $level secure level
|
||||||
* @param array $lists filter lists like whitelist, blacklist, dnsbl,..
|
* @param array $lists filter lists like whitelist, blacklist,..
|
||||||
* @return bool is the email address valid?
|
* @return bool is the email address valid?
|
||||||
*/
|
*/
|
||||||
static function email (string $email, int $level=1, array $lists=[]) : bool
|
static function email (string $email, int $level=1, array $lists=[]) : bool
|
||||||
|
@ -51,11 +51,6 @@ class Validate
|
||||||
$results = checkdnsrr($split[1], "MX");
|
$results = checkdnsrr($split[1], "MX");
|
||||||
}
|
}
|
||||||
|
|
||||||
// DNS Blacklist (domains)
|
|
||||||
if($results && isset($lists['dnsbl']) && $level >= 3) {
|
|
||||||
// TODO: check if domain is registered in dnsbl of list.
|
|
||||||
}
|
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue