Skip to content

Commit ba2d572

Browse files
authored
Update CraftValetDriver.php
When applying https://github.com/craftcms/security-patches to a Craft project, the fix for [CVE-2024-56145](GHSA-2p6p-9rc9-62j9) breaks sites served by Valet (and Herd). This fix allows these sites to work when using Valet (and Herd).
1 parent 66b7d43 commit ba2d572

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/Valet/Drivers/Specific/CraftValetDriver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ public function frontControllerPath(string $sitePath, string $siteName, string $
193193
$_SERVER['PHP_SELF'] = $scriptName;
194194
$_SERVER['DOCUMENT_ROOT'] = $sitePath.'/'.$frontControllerDirectory;
195195

196+
if (isset($_SERVER['argv'])) {
197+
unset($_SERVER['argv']);
198+
}
199+
196200
return $indexPath;
197201
}
198202
}

0 commit comments

Comments
 (0)