[BUGFIX] Always allow access to processing folder 65/17165/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 14 Dec 2012 12:48:58 +0000 (13:48 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 14 Dec 2012 15:43:11 +0000 (16:43 +0100)
Processed files are temporary files which can be recreated
without problems. So there is no need to check the permissions
for these.

Currently backend users get an exception when a processed file
needs to be recreated,  because the processed folder is not within
the filemounts.

Releases: 6.0, 6.1
Fixes: #44013

Change-Id: I79b49e7a0be1563e3786a0947a3ba838ff5560ec
Reviewed-on: https://review.typo3.org/17161
Reviewed-by: Andreas Wolf
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-on: https://review.typo3.org/17165

typo3/sysext/core/Classes/Resource/ResourceStorage.php

index ce5f9b9..2d7b822 100644 (file)
@@ -500,12 +500,18 @@ class ResourceStorage {
                                $subject = $this->getRootLevelFolder();
                        }
                        $identifier = $subject->getIdentifier();
-                       // Check if the identifier of the subject is within at
-                       // least one of the file mounts
-                       foreach ($this->fileMounts as $fileMount) {
-                               if ($this->driver->isWithin($fileMount['folder'], $identifier)) {
-                                       $isWithinFilemount = TRUE;
-                                       break;
+
+                       // Allow access to processing folder
+                       if ($this->driver->isWithin($this->getProcessingFolder(), $identifier)) {
+                               $isWithinFilemount = TRUE;
+                       } else {
+                               // Check if the identifier of the subject is within at
+                               // least one of the file mounts
+                               foreach ($this->fileMounts as $fileMount) {
+                                       if ($this->driver->isWithin($fileMount['folder'], $identifier)) {
+                                               $isWithinFilemount = TRUE;
+                                               break;
+                                       }
                                }
                        }
                }