Skip to content
Snippets Groups Projects
Commit 82aa4141 authored by Markus Klein's avatar Markus Klein Committed by Benni Mack
Browse files

[BUGFIX] Make encoding of parameters for cHash independent of PHP settings

http_build_query() internally uses the PHP setting arg-separator.output
to identify the URL parameter separator.
Our code relies on having a simple ampersand as this character.
If the PHP is set to a different configuration the code will fail.

This is fixed by enforcing the ampersand. Moreover we force RFC3986
encoding to ensure that decoding with rawurldecode() does the right
thing.

Releases: master, 8.7
Resolves: #81293
Change-Id: I321c7bba03ee597adc29a2f8429b8fc9ac3b709d
Reviewed-on: https://review.typo3.org/52922


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarCarsten Falkenberg <office@limebox.de>
Tested-by: default avatarCarsten Falkenberg <office@limebox.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 47f21fd3
No related merge requests found
......@@ -63,7 +63,7 @@ class CacheHashEnforcer implements SingletonInterface
$parameters = [$pluginNamespace => $arguments];
$parameters['id'] = $this->typoScriptFrontendController->id;
$relevantParameters = $this->cacheHashCalculator->getRelevantParameters(
http_build_query($parameters)
http_build_query($parameters, '', '&', PHP_QUERY_RFC3986)
);
if (count($relevantParameters) > 0) {
$this->typoScriptFrontendController->reqCHash();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment