Bug #17070
closedtypolink: cHash corrupted due to linkVars
0%
Description
I've found an error in function typolink of class.tslib_content.php
Line 5222 :
$pA = t3lib_div::cHashParams($addQueryParams.$GLOBALS['TSFE']->linkVars);
Here linkvars are appended to additionalParams, wich is wrong, because when the url is build (in class.tstemplate.php, function linkData, line 1382), linkVars are prepended (that allows additionalParams to ovveride linkVars).
Also when a typolink tries to override a linkVar, the cHash is always wrong!
Example : overriding L parameter from value 1 to value 2 :
cHash is calculated for &L=2&L=1, but the final link will be &L=1&L=2
Also I propose to replace the line 5222 (in class.tslib_content.php)
$pA=t3lib_div::cHashParams($addQueryParams.$GLOBALS['TSFE']->linkVars);
by this :
$pA=t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars.$addQueryParams);
cHash is not calculated by menus (HMENU cObjects), and putting cHash value in linkVars is not a good solution because cHash will not be valid if current url contains a parameter wich will not be saved by linkVars
Maybe cHash should be generated in the function linkData? Or menu should use typolink instead of linkdata?
(issue imported from #M5117)
Files