From ce30653d3bcdbfac59dbd2e6d97daddaa2ff54f2 Mon Sep 17 00:00:00 2001 From: Jonas Leder <jonas@jonasled.de> Date: Thu, 3 Feb 2022 10:25:55 +0100 Subject: [PATCH] throw error if url is not set or empty --- public/API/ebayimg.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/API/ebayimg.php b/public/API/ebayimg.php index 7623edc..1eaafd9 100644 --- a/public/API/ebayimg.php +++ b/public/API/ebayimg.php @@ -1,4 +1,8 @@ <?php +if(!array_key_exists("url", $_GET) || $_GET["url"] == "") { + die("URL not set or empty"); +} + $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "https://i.ebayimg.com/" . $_GET["url"]); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); -- GitLab