add specific chars for matching of ipv6 addresses (#1040)

when validating servers in the `Host` property.
This commit is contained in:
Kirill Voronov 2017-05-11 02:22:50 +03:00 committed by Marcus Bointon
parent 4f6255858f
commit a3b4f6b281
1 changed files with 1 additions and 1 deletions

View File

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