Skip to content

Commit d234e50

Browse files
committed
Simpler regex
1 parent c1c075a commit d234e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHPMailer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4249,7 +4249,7 @@ public static function isValidHost($host)
42494249
empty($host)
42504250
|| !is_string($host)
42514251
|| strlen($host) > 256
4252-
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
4252+
|| !preg_match('/^([a-z\d.-]*|\[[a-f\d:]+\])$/i', $host)
42534253
) {
42544254
return false;
42554255
}

0 commit comments

Comments
 (0)