summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-30 16:43:55 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-12-02 20:05:09 +0000
commita305573abd79e38ba7337549369b5c21f1ff91ab (patch)
tree68ea2ded21d239d97bc89ac8009c09438843ddac /apps
parentfb874e5d6d67b04c5c29030cebe555b8c77bf687 (diff)
downloadnextcloud-server-a305573abd79e38ba7337549369b5c21f1ff91ab.tar.gz
nextcloud-server-a305573abd79e38ba7337549369b5c21f1ff91ab.zip
Only execute plain mimetype check for directories and do the fallback only for non-directories
Ref #23096 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 4e61e5693b9..8d9e2468ebd 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -102,8 +102,12 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
*/
public function executeCheck($operator, $value) {
$actualValue = $this->getActualValue();
- return $this->executeStringCheck($operator, $value, $actualValue) ||
- $this->executeStringCheck($operator, $value, $this->mimeTypeDetector->detectPath($this->path));
+ $plainMimetypeResult = $this->executeStringCheck($operator, $value, $actualValue);
+ if ($actualValue === 'httpd/unix-directory') {
+ return $plainMimetypeResult;
+ }
+ $detectMimetypeBasedOnFilenameResult = $this->executeStringCheck($operator, $value, $this->mimeTypeDetector->detectPath($this->path));
+ return $plainMimetypeResult || $detectMimetypeBasedOnFilenameResult;
}
/**