rabin 2 năm trước cách đây
mục cha
commit
dee6ba3824
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/PHPMailer.php

+ 1 - 1
src/PHPMailer.php

@@ -3628,7 +3628,7 @@ class PHPMailer
             //Is it a valid IPv4 address?
             //Is it a valid IPv4 address?
             return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
             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?
             //Is it a syntactically valid hostname?
             return true;
             return true;
         }
         }