[BUGFIX] Ignore PATH_INFO in NormalizedParams scriptName calculation
When NormalizedParams was introduced, the code that was refactored from GeneralUtility:getIndpEnv did not take into account that PATH_INFO could be set, but be empty. (which happens with the Debian 9 NGINX default configuration which uses `fastcgi_split_path_info` and set's `fastcgi_param PATH_INFO` even if it's empty). Now, the fallback to PATH_INFO has been introduced with the initial revision of TYPO3 and isn't needed at all nowadays, it's actually wrong, as a REQUEST_URI to /index.php/foo/bar would incorrectly be interpreted as $scriptName == "/foo/bar". This patch additionally replaces PATH_INFO with SCRIPT_NAME in test cases where this variable is actually wrong (we assume test cases have been modeled to match (old) code, instead of reality here): * ProxyPass does not result in PATH_INFO being set, it's SCRIPT_NAME here. * PATH_INFO is not set for regular request to /typo3/index.php Resolves: #88304 Releases: master, 9.5 Change-Id: I501ad3bc10b0988385906a1fe9cb668c5e3696b6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60719 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Benny Schimmer <b.schimmer@saint-elmos.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benny Schimmer <b.schimmer@saint-elmos.com> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org>
parent
d8bd7129
Please register or sign in to comment