Merge pull request #216 from copenhagentruckwash/fix-vulnerability-in-wash-certificate-access
Disable global .pdf shortcut to prevent unauthenticated certificate downloads
This commit is contained in:
@@ -237,11 +237,6 @@ if (php_sapi_name() === 'cli' || isset($_GET['internalCronCall'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// If the route ends with .php, then require the file_server.php
|
||||
if (str_contains($_SERVER['REQUEST_URI'], '.pdf')) {
|
||||
require_once 'file_server.php';
|
||||
exit;
|
||||
}
|
||||
// If the route ends with a MIME type, then require the file_server.php
|
||||
if ((preg_match('/\.(jpg|jpeg|png)$/', $_SERVER['REQUEST_URI']) || str_contains($_SERVER['REQUEST_URI'], '/files/'))) {
|
||||
require_once 'file_server.php';
|
||||
|
||||
Reference in New Issue
Block a user