Skip to content

Commit

Permalink
Update src/Utils/PathCanonicalize.php
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Valchev authored and bobdenotter committed Feb 8, 2021
1 parent a10b062 commit f7795d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/PathCanonicalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function canonicalize(string $basePath, string $filename): string

// If the path is outside the `$basePath`, we do not allow it.
if (mb_strpos(Path::makeRelative($path, $basePath), '..') === 0) {
throw new \Exception('You are not allowed to do that');
throw new \Exception('You are not allowed to access path ' . $path);
}

return $path;
Expand Down

0 comments on commit f7795d0

Please # to comment.