Bug #21345
closedcHash is generated when no parameters are given
0%
Description
If somebody adds accidentally useCacheHash to typolink configuration the caching of Typo3 gets broken (only in combination with RealURL).
Example Typoscript :
10 = TEXT
10 {
typolink {
parameter.data = TSFE:id
additionalParams.dataWrap = &{getIndpEnv : QUERY_STRING}
useCacheHash = 1
}
}
If getIndpEnv : QUERY_STRING is empty the value of additionalParams is '&'
The typolink method of tslib_content calculates always the cHash if useCacheHash is set in typolinkconfig.
If additionalParams is '&' t3lib_div::cHashParams returns an array with two items:
'encryptionKey' => 'encrypt key
'' => empty
so the cHash gets calculated faulty and RealURL takes the faulty cHash and stores it to the tx_realurl_chashcache table.
The result is faulty cHash calculations:
The incoming cHash "f2810e4376" and calculated cHash "5de407b1c4" did not match, so caching was disabled. The fieldlist used was "encryptionKey"
and the site runs on non cached.
The attached patch pervents faulty calculations.
(issue imported from #M12322)
Files