diff options
Diffstat (limited to '181.patch')
-rw-r--r-- | 181.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/181.patch b/181.patch new file mode 100644 index 0000000..e3ce883 --- /dev/null +++ b/181.patch @@ -0,0 +1,29 @@ +From 24f0601345fa245eddaaecab5dde8fc0d14b0ef6 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 28 Jun 2021 08:47:07 +0200 +Subject: [PATCH] only return valid IPs + +--- + src/Config/Config.php | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/Config/Config.php b/src/Config/Config.php +index 37ae91d..81b70a4 100644 +--- a/src/Config/Config.php ++++ b/src/Config/Config.php +@@ -85,7 +85,14 @@ public static function loadResolvConfBlocking($path = null) + preg_match_all('/^nameserver\s+(\S+)\s*$/m', $contents, $matches); + + $config = new self(); +- $config->nameservers = $matches[1]; ++ $config->nameservers = []; ++ ++ /* only valid IP */ ++ foreach($matches[1] as $n) { ++ if (filter_var("$n",FILTER_VALIDATE_IP)) { ++ $config->nameservers[] = $n; ++ } ++ } + + return $config; + } |