Skip to content

Commit

Permalink
Resolve temporarily open_basedir issue (#1061)
Browse files Browse the repository at this point in the history
* open_basedir issue

Resolve open_basedir issue adding dot for relativize filename path

* Fix code style

* add comments

Signed-off-by: Sam Poyigi <[email protected]>

---------

Signed-off-by: Sam Poyigi <[email protected]>
Co-authored-by: Sam Poyigi <[email protected]>
  • Loading branch information
Concreta09 and sampoyigi authored Dec 27, 2023
1 parent 1c262c4 commit f916a34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/system/libraries/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f916a34

Please sign in to comment.