[FEATURE] Improve creation of URL query strings from arrays 79/55079/40
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 18 Dec 2017 18:46:47 +0000 (19:46 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 5 Nov 2018 20:43:20 +0000 (21:43 +0100)
commitff6ad483a2f69d5adb68845b913053e5692ec269
treeecf64500154ba880099c49e6e5a50d6ff8a17a0c
parentc3f32cbb3de5d1d943e88ab8c6f80d5d21e8d877
[FEATURE] Improve creation of URL query strings from arrays

Adds a new method HttpUtility::buildQueryString() using
http_build_query() instead of reimplementing the encoding-process like
the old method GeneralUtility::implodeArrayForUrl() did.

As the parameter $rawurlencodeParamName of implodeArrayForUrl() was set
to "false" by default and used in several places without manually
setting it to "true" using that method could lead to potentially unsafe
non-encoded parameter names.

Some unit-tests had wrong URLs with non-encoded braces [...], which were
adapted to be properly escaped as well.

Resolves: #83334
Releases: master
Change-Id: Ifbaad912f0d658671356dc7bdf1579dacff272df
Reviewed-on: https://review.typo3.org/55079
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
37 files changed:
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/LinkBrowserController.php
typo3/sysext/backend/Classes/Routing/UriBuilder.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Template/ModuleTemplate.php
typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php
typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/HttpUtility.php
typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-83334-AddImprovedBuildQueryString.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/HttpUtilityTest.php
typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/felogin/Tests/Unit/Controller/FrontendLoginControllerTest.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Classes/ViewHelpers/Uri/ActionViewHelper.php
typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recordlist/Classes/Tree/View/ElementBrowserPageTreeView.php
typo3/sysext/recordlist/Classes/Tree/View/RecordBrowserPageTreeView.php
typo3/sysext/recordlist/Classes/View/FolderUtilityRenderer.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php