Преглед на файлове

Correctly detect the mimetype from uploads

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v18.0.0beta1
Joas Schilling преди 4 години
родител
ревизия
744b635d5c
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      apps/workflowengine/lib/Check/FileMimeType.php

+ 1
- 1
apps/workflowengine/lib/Check/FileMimeType.php Целия файл

@@ -111,7 +111,7 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
$files = $this->request->getUploadedFile('files');
if (isset($files['type'][0])) {
$mimeType = $files['type'][0];
if ($this->mimeType === 'application/octet-stream') {
if ($mimeType === 'application/octet-stream') {
// Maybe not...
$mimeTypeTest = $this->mimeTypeDetector->detectPath($files['name'][0]);
if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {

Loading…
Отказ
Запис