[BUGFIX] EM, Error when downloading extension files
authorMarkus Klein <klein.t3@mfc-linz.at>
Wed, 5 Oct 2011 23:56:50 +0000 (18:56 -0500)
committerSteffen Gebert <steffen.gebert@typo3.org>
Fri, 7 Oct 2011 21:18:45 +0000 (23:18 +0200)
Trying to download a file using the Edit Files page of the old EM
leads to a fatal error, because URL is not decoded properly.

Change-Id: I6980a0fbe8967bff0df0d8d7bc4c8f1abf53615e
Resolves: #27098
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/5578
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Stefan
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/em/classes/index.php

index bd11b5d..eedea48 100644 (file)
@@ -1678,7 +1678,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                        } elseif ($this->CMD['downloadFile'] && !in_array($extKey, $this->requiredExt)) {
 
                                // Link for downloading extension has been clicked - deliver content stream:
-                               $dlFile = $this->CMD['downloadFile'];
+                               $dlFile = urldecode($this->CMD['downloadFile']);
                                if (t3lib_div::isAllowedAbsPath($dlFile) && t3lib_div::isFirstPartOfStr($dlFile, PATH_site) && t3lib_div::isFirstPartOfStr($dlFile, $absPath) && @is_file($dlFile)) {
                                        $mimeType = 'application/octet-stream';
                                        Header('Content-Type: ' . $mimeType);