[BUGFIX] Use proper URL for file list of returnUrl in file_upload 72/46872/2
authorBenni Mack <benni@typo3.org>
Tue, 16 Feb 2016 19:58:36 +0000 (20:58 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Wed, 24 Feb 2016 13:42:14 +0000 (14:42 +0100)
When the file upload controller is called (which is almost
impossible to call these days) and no return URL is given
(which is again almost impossible), then the URL is invalid.

The patch uses the proper getModuleUrl() call which is
sufficient.

Resolves: #73506
Releases: master, 7.6
Change-Id: I49830e84cb10c14ccb84ea932927898899e58e70
Reviewed-on: https://review.typo3.org/46872
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/File/FileUploadController.php

index 9b414f0..93375c0 100644 (file)
@@ -85,9 +85,9 @@ class FileUploadController extends AbstractModule
         $this->target = GeneralUtility::_GP('target');
         $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
         if (!$this->returnUrl) {
-            $this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL')
-                . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list')
-                . '&id=' . rawurlencode($this->target);
+            $this->returnUrl = BackendUtility::getModuleUrl('file_list', [
+                'id' => rawurlencode($this->target)
+            ]);
         }
         // Create the folder object
         if ($this->target) {