From cb1ff188f93d819898b8733dcf9f5fd3b6f06a91 Mon Sep 17 00:00:00 2001 From: mscherer Date: Tue, 15 Oct 2024 23:44:08 +0200 Subject: [PATCH] Use new methods. --- webroot/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webroot/index.php b/webroot/index.php index 544b47972b..cde1e5ed0f 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -21,7 +21,7 @@ $url = parse_url(urldecode($_SERVER['REQUEST_URI'])); $file = __DIR__ . $url['path']; - if (strpos($url['path'], '..') === false && strpos($url['path'], '.') !== false && is_file($file)) { + if (!str_contains($url['path'], '..') && str_contains($url['path'], '.') && is_file($file)) { return false; } }