Simpler regex
This commit is contained in:
parent
c1c075a69e
commit
d234e50f25
|
|
@ -4249,7 +4249,7 @@ class PHPMailer
|
|||
empty($host)
|
||||
|| !is_string($host)
|
||||
|| strlen($host) > 256
|
||||
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
|
||||
|| !preg_match('/^([a-z\d.-]*|\[[a-f\d:]+\])$/i', $host)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue