upload nach _files
This commit is contained in:
@@ -51,10 +51,10 @@ if (!$file) {
|
||||
/**
|
||||
* Dateipfad
|
||||
*/
|
||||
$basePath = '/var/www/files/';
|
||||
$path = realpath($basePath . $file['stored_name']);
|
||||
$basePath = realpath(__DIR__ . '/_files');
|
||||
$path = $basePath ? realpath($basePath . '/' . $file['stored_name']) : null;
|
||||
|
||||
if (!$path || !str_starts_with($path, $basePath) || !is_file($path)) {
|
||||
if (!$path || !$basePath || !str_starts_with($path, $basePath) || !is_file($path)) {
|
||||
http_response_code(404);
|
||||
exit('Datei fehlt');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user