[BUGIFX] Allow file replace for editors 79/52379/3
authorHelmut Hummel <typo3@helhum.io>
Thu, 6 Apr 2017 19:07:16 +0000 (21:07 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 7 Apr 2017 14:37:49 +0000 (16:37 +0200)
When file extension permissions are configured, replacing
a file fails with an error message, because the file extension
is checked on the local path of the temporary file.

Remove this bogus check to allow file replace for editors.

Resolves: #77855
Releases: 6.2, 7.6, master
Change-Id: Icaf01252b3dbcfbdfb89349281389465f9e0ce9a
Reviewed-on: https://review.typo3.org/52379
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index 296e9bc..a4575fc 100644 (file)
@@ -1893,9 +1893,6 @@ class ResourceStorage implements ResourceStorageInterface
     public function replaceFile(FileInterface $file, $localFilePath)
     {
         $this->assureFileReplacePermissions($file);
-        if (!$this->checkFileExtensionPermission($localFilePath)) {
-            throw new Exception\IllegalFileExtensionException('Source file extension not allowed.', 1378132239);
-        }
         if (!file_exists($localFilePath)) {
             throw new \InvalidArgumentException('File "' . $localFilePath . '" does not exist.', 1325842622);
         }