Simpler regex

This commit is contained in:
Marcus Bointon 2024-09-12 09:27:58 +02:00
parent c1c075a69e
commit d234e50f25
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}