[BUGFIX] Ensure absolute paths for &eID=dumpFile 39/53439/3
authorXavier Perseguers <xavier@typo3.org>
Tue, 6 Jun 2017 14:58:19 +0000 (16:58 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 14 Dec 2017 20:05:20 +0000 (21:05 +0100)
When using realurl (or other extensions modifying the
path of the frontend) then index.php may be linked not
to PATH_site and needs to be taken into account.

Resolves: #81486
Releases: master, 8.7
Change-Id: Ie58fd7f020d26d936c4ce313edb359c3ed9831ef
Reviewed-on: https://review.typo3.org/53439
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.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 546638c..9606544 100644 (file)
@@ -1299,7 +1299,8 @@ class ResourceStorage implements ResourceStorageInterface
                     }
 
                     $queryParameterArray['token'] = GeneralUtility::hmac(implode('|', $queryParameterArray), 'resourceStorageDumpFile');
-                    $publicUrl = 'index.php?' . http_build_query($queryParameterArray, '', '&', PHP_QUERY_RFC3986);
+                    $publicUrl = GeneralUtility::locationHeaderUrl(PathUtility::getAbsoluteWebPath(PATH_site . 'index.php'));
+                    $publicUrl .= '?' . http_build_query($queryParameterArray, '', '&', PHP_QUERY_RFC3986);
                 }
 
                 // If requested, make the path relative to the current script in order to make it possible