From 5b8c9eaed7897749251ab2ee1cebdf7637b6ce43 Mon Sep 17 00:00:00 2001 From: lolcat Date: Mon, 4 Sep 2023 10:17:08 -0400 Subject: security fix shieet --- lib/curlproxy.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/curlproxy.php b/lib/curlproxy.php index 7d4ca5d..93cdbdc 100644 --- a/lib/curlproxy.php +++ b/lib/curlproxy.php @@ -128,12 +128,9 @@ class proxy{ } // sanitize URL - try{ + if($this->validateurl($url) === false){ - $this->validateurl($url); - }catch(Exception $error){ - - throw new Exception($error->getMessage()); + throw new Exception("Invalid URL"); } $this->clientcache(); @@ -353,12 +350,9 @@ class proxy{ $this->format = $format; // sanitize URL - try{ - - $this->validateurl($url); - }catch(Exception $error){ + if($this->validateurl($url) === false){ - throw new Exception($error->getMessage()); + throw new Exception("Invalid URL"); } $this->clientcache(); -- cgit v1.2.3