add specific chars for matching of ipv6 addresses (#1040)
when validating servers in the `Host` property.
This commit is contained in:
parent
4f6255858f
commit
a3b4f6b281
|
|
@ -1622,7 +1622,7 @@ class PHPMailer
|
|||
|
||||
foreach ($hosts as $hostentry) {
|
||||
$hostinfo = array();
|
||||
if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) {
|
||||
if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9:\[\]\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) {
|
||||
// Not a valid host entry
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue