From f916a3407c68f852f1fa170cef2fafdb1b9df1c1 Mon Sep 17 00:00:00 2001 From: Luca Benati <97920581+Concreta09@users.noreply.github.com> Date: Thu, 28 Dec 2023 00:24:35 +0100 Subject: [PATCH] Resolve temporarily open_basedir issue (#1061) * open_basedir issue Resolve open_basedir issue adding dot for relativize filename path * Fix code style * add comments Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --------- Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Co-authored-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/system/libraries/Assets.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/system/libraries/Assets.php b/app/system/libraries/Assets.php index 15316b94da..2eb9ea2b86 100644 --- a/app/system/libraries/Assets.php +++ b/app/system/libraries/Assets.php @@ -249,6 +249,10 @@ protected function getAssetPath($name) if (File::isPathSymbol($name)) return File::symbolizePath($name); + // Resolve temporarily open_basedir issue https://github.com/tastyigniter/TastyIgniter/pull/1061 + if (File::isFile('.'.$name)) + return '.'.$name; + if (File::isFile($name)) return $name;