Project

General

Profile

Actions

Bug #17070

closed

typolink: cHash corrupted due to linkVars

Added by Popy no-lastname-given about 17 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-03-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

0005117.patch (1.36 KB) 0005117.patch Administrator Admin, 2007-03-04 13:12
tslib_content.diff (2.21 KB) tslib_content.diff Administrator Admin, 2007-08-02 15:20
tslib_content.trunk.patch (1.18 KB) tslib_content.trunk.patch Administrator Admin, 2010-05-20 15:41
tslib_content.v43.patch (1.18 KB) tslib_content.v43.patch Administrator Admin, 2010-05-20 15:42
tslib_content.v42.patch (1.58 KB) tslib_content.v42.patch Administrator Admin, 2010-05-20 15:42
tslib_content.v42.fixed.patch (1.89 KB) tslib_content.v42.fixed.patch Administrator Admin, 2010-05-21 10:37
5117_4-4.diff (1.39 KB) 5117_4-4.diff Administrator Admin, 2010-06-02 14:25

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #17095: Typolink : cHash isn't created if there's no additionalParamsClosed2007-03-08

Actions
Related to TYPO3 Core - Bug #22788: Make sure that cHash is the same regardless of parameter orderClosed2010-06-02

Actions
Related to TYPO3 Core - Bug #19003: double cache or no cache through cHash variants of the same URLClosed2008-06-23

Actions
Is duplicate of TYPO3 Core - Bug #17002: cHash is not recreated on disposal in config.linkVarsClosed2007-02-17

Actions
Actions

Also available in: Atom PDF