Skip to content

Commit

Permalink
Fix: Use PIMCORE_WEB_ROOT (#14970)
Browse files Browse the repository at this point in the history
* Fix: Use PIMCORE_WEB_ROOT

* Doc: Add Upgrade Notes

* Revert "Doc: Add Upgrade Notes"

This reverts commit 5316764.
  • Loading branch information
robertSt7 committed Apr 20, 2023
1 parent b9c9ca2 commit deae04d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bundles/AdminBundle/Controller/Admin/MiscController.php
Expand Up @@ -144,7 +144,7 @@ public function scriptProxyAction(Request $request)
throw $this->createNotFoundException('Directory not found!');
}

if(!str_starts_with($scriptPath, rtrim(str_replace('../', '', PIMCORE_PROJECT_ROOT), './'))) {
if(!str_starts_with($scriptPath, rtrim(str_replace('../', '', PIMCORE_WEB_ROOT), './'))) {
throw $this->createAccessDeniedException('Scripts not found! Please do not navigate out of the web root directory!');
}

Expand Down

0 comments on commit deae04d

Please sign in to comment.