From a08568f2c27c8bb27acbc658b7f3eea40382640f Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Wed, 5 Mar 2025 19:48:15 +0530 Subject: [PATCH] Updated from main --- favicon.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/favicon.php b/favicon.php index be9a7e0..4aebbcf 100644 --- a/favicon.php +++ b/favicon.php @@ -15,7 +15,12 @@ class favicon{ header("Content-Type: image/png"); - if(substr_count($url, "/") !== 2){ + if( + preg_match( + '/^https?:\/\/[A-Za-z0-9.-]+$/', + $url + ) === 0 + ){ header("X-Error: Only provide the protocol and domain"); $this->defaulticon();