[BUGFIX] EM, Error when downloading extension files
authorMarkus Klein <klein.t3@mfc-linz.at>
Wed, 5 Oct 2011 23:59:44 +0000 (18:59 -0500)
committerSteffen Gebert <steffen.gebert@typo3.org>
Fri, 7 Oct 2011 17:31:12 +0000 (19:31 +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: Ibd8f71fbc0ff8d9761b35cde713c3c021c6eb31e
Resolves: #27098
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/5579
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Stefan
Tested-by: Stefan
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/em/classes/index.php

index 11e028d..f2cd743 100644 (file)
@@ -1668,7 +1668,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);