mirror of
https://github.com/archtechx/tenancy.git
synced 2026-09-20 14:14:03 +00:00
Add comment above $attemptedPath
At first glance, it could look weird that $attemptedPath uses "/" but the check in abortIf below uses DIRECTORY_SEPARATOR. Add comment that explains this.
This commit is contained in:
parent
efc0877f10
commit
e7c0193931
1 changed files with 1 additions and 0 deletions
|
|
@ -142,6 +142,7 @@ class TenantAssetController implements HasMiddleware
|
||||||
// The asset root doesn't exist, so it cannot contain files
|
// The asset root doesn't exist, so it cannot contain files
|
||||||
$this->abortIf($allowedRoot === false, "Storage root doesn't exist");
|
$this->abortIf($allowedRoot === false, "Storage root doesn't exist");
|
||||||
|
|
||||||
|
// realpath() ensures the directory exists and converts / to \ on Windows
|
||||||
$attemptedPath = realpath("{$allowedRoot}/{$path}");
|
$attemptedPath = realpath("{$allowedRoot}/{$path}");
|
||||||
|
|
||||||
// User is attempting to access a nonexistent file
|
// User is attempting to access a nonexistent file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue