1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-09-20 15: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:
lukinovec 2026-09-07 10:42:18 +02:00 committed by Samuel Stancl
parent efc0877f10
commit e7c0193931

View file

@ -142,6 +142,7 @@ class TenantAssetController implements HasMiddleware
// The asset root doesn't exist, so it cannot contain files
$this->abortIf($allowedRoot === false, "Storage root doesn't exist");
// realpath() ensures the directory exists and converts / to \ on Windows
$attemptedPath = realpath("{$allowedRoot}/{$path}");
// User is attempting to access a nonexistent file