From a46c652c32e0d1946e60c1fb24b234e751c030cc Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 23 Mar 2026 11:08:11 +0000 Subject: [PATCH] Fixed host suffix check --- include/prepend.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/prepend.inc b/include/prepend.inc index 83e50b826..b2f3969f1 100644 --- a/include/prepend.inc +++ b/include/prepend.inc @@ -26,7 +26,7 @@ header("Permissions-Policy: interest-cohort=()"); } $host = parse_url($_SERVER["HTTP_ORIGIN"]); - if (strncmp(strrev($host["host"]), strrev("php.net"), strlen("php.net")) != 0) { + if (!preg_match('/^(.+\.)?php\.net$/', $host["host"])) { if ($host["host"] != $_SERVER["SERVER_NAME"]) { exit(10); }