Skip to content

Commit

Permalink
[fix] openbase_dir correct processing, #13214
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalitov committed May 2, 2018
1 parent e99b38d commit 657869e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/joomla/filesystem/folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static function create($path = '', $mode = 0755)
{
$test = $pathObject->clean($test);

if (strpos($path, $test) === 0)
if (strpos($path, $test) === 0 || strpos($path, realpath($test)) === 0)
{
$inBaseDir = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/filesystem/src/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static function create($path = '', $mode = 0755)
{
$test = Path::clean($test);

if (strpos($path, $test) === 0)
if (strpos($path, $test) === 0 || strpos($path, realpath($test)) === 0)
{
$inBaseDir = true;
break;
Expand Down

0 comments on commit 657869e

Please sign in to comment.