rabin %!s(int64=2) %!d(string=hai) anos
pai
achega
dee6ba3824
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/PHPMailer.php

+ 1 - 1
src/PHPMailer.php

@@ -3628,7 +3628,7 @@ class PHPMailer
             //Is it a valid IPv4 address?
             return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
         }
-        if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) {
+        if (preg_match('/http:\/\/[\w.]+[\w\/]*[\w.]*\??[\w=&\+\%]*/is','http://' . $host)) {
             //Is it a syntactically valid hostname?
             return true;
         }