From c78f50ab8c536e910b621fdae485bb87c1b8181e Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 6 Aug 2025 18:03:51 -0400 Subject: [PATCH] cap the path_prefix to 3 depth directories max --- includes/router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/router.php b/includes/router.php index 47318f00..31cd8e7a 100644 --- a/includes/router.php +++ b/includes/router.php @@ -4,5 +4,5 @@ // Currently unused, but the idea is to dynamically prepend ../../ to asset paths (like includes, libraries, etc.) // based on the current directory depth. This allows us to support deeply nested folder structures. -$depth = substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/'); +$depth = min(substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/'), 3); $path_prefix = str_repeat('../', $depth);