From 7f593bfe3143f66b3e87cdd1cdd54cdf2a4dcaf5 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 22 Jun 2022 14:04:53 +0100 Subject: [PATCH] Add timeout to wget to extract public IP, thx @zbchristian --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 526b3ae1..6cfbeddd 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -787,7 +787,7 @@ class validation */ function get_public_ip() { - exec('wget https://ipinfo.io/ip -qO -', $public_ip); + exec('wget --timeout=5 --tries=1 https://ipinfo.io/ip -qO -', $public_ip); return $public_ip[0]; }