diff options
| author | lolcat <will@lolcat.ca> | 2023-09-04 10:17:08 -0400 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2023-09-04 10:17:08 -0400 |
| commit | 5b8c9eaed7897749251ab2ee1cebdf7637b6ce43 (patch) | |
| tree | 813c3ac6dd9a4c34b6a4cdd0415cffc9b03f3497 /lib | |
| parent | 38b97a26e5e4a9c432081f8823d858e64ad6af68 (diff) | |
security fix shieet
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/curlproxy.php | 14 |
1 files changed, 4 insertions, 10 deletions
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(); |
