Bug #78021

cHashIncludePageId and links to the domain with parameters fail

Added by DMK E-BUSINESS GmbH about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2016-09-21
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the new option cHashIncludePageId is set to true links to the domain/root page will fail if parameters and a cHash is appended. This is because the id Parameter is missing. I think that's normal for links to the root page/domain so this needs to be fixed.

Error message: ID parameter
needs to be passed for the cHash calculation! As a temporary not recommended
workaround, you can set $GLOBALS['TYPO3_CONF_VARS']['FE']['cHashIncludePageId'] to
false to avoid this error.


Related issues

Related to TYPO3 Core - Bug #78526: Wrong cHash calculation when url aliases are used with $GLOBALS['TYPO3_CONF_VARS']['FE']['cHashIncludePageId'] Resolved 2016-11-01

Associated revisions

Revision 11668448 (diff)
Added by Dmitry Dulepov about 1 year ago

[BUGFIX] Exception with cHashIncludePageId but no id in the URL

If the 'id' parameter is not provided in the URL but the
FE|cHashIncludePageId is set to true, TYPO3 will throw an exception. If
id is missing in $_GET, TYPO3 should use the determined id for the
check because in such case the id is assumed to be the uid of the home
page of the current site.

Resolves: #78021
Releases: master, 7.6, 6.2
Change-Id: Ib13d7aac9a75b2be54c7fddf6896af2f0a52e18e
Reviewed-on: https://review.typo3.org/50030
Tested-by: TYPO3com <>
Reviewed-by: Andreas Allacher <>
Tested-by: Andreas Allacher <>
Reviewed-by: Frans Saris <>
Reviewed-by: Helmut Hummel <>
Reviewed-by: Frank Naegler <>
Tested-by: Helmut Hummel <>

Revision a6dd4d5e (diff)
Added by Dmitry Dulepov about 1 year ago

[BUGFIX] Exception with cHashIncludePageId but no id in the URL

If the 'id' parameter is not provided in the URL but the
FE|cHashIncludePageId is set to true, TYPO3 will throw an exception. If
id is missing in $_GET, TYPO3 should use the determined id for the
check because in such case the id is assumed to be the uid of the home
page of the current site.

Resolves: #78021
Releases: master, 7.6, 6.2
Change-Id: Ib13d7aac9a75b2be54c7fddf6896af2f0a52e18e
Reviewed-on: https://review.typo3.org/50198
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

Revision 59f74041 (diff)
Added by Dmitry Dulepov about 1 year ago

[BUGFIX] Exception with cHashIncludePageId but no id in the URL

If the 'id' parameter is not provided in the URL but the
FE|cHashIncludePageId is set to true, TYPO3 will throw an exception. If
id is missing in $_GET, TYPO3 should use the determined id for the
check because in such case the id is assumed to be the uid of the home
page of the current site.

Resolves: #78021
Releases: master, 7.6, 6.2
Change-Id: Ib13d7aac9a75b2be54c7fddf6896af2f0a52e18e
Reviewed-on: https://review.typo3.org/50199
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

History

#1 Updated by Sven Burkert about 1 year ago

For every link, an id parameter is provided, even for the links to the root page. The root page also has an uid, right?

#2 Updated by Andreas Allacher about 1 year ago

I think this is only an issue in combination with realurl because realurl strips the ID parameter on the rootpage and therefore
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::fetch_the_id will determine the ID by using e.g. using the domainStartPage but that method will not set the corresponding $_GET['id'] parameter.

I think it actually should also be set here as the page ID has been determined by the core (even if it wasn't in the URL) but was not added to the GET-parameters afterwards to have a correct cHash verification.
But I think it is more a realurl bug as realurl removed the ID parameter from the corresponding link and should therefore ensure it is added correctly again.

#3 Updated by Dmitry Dulepov about 1 year ago

'id' parameter is not required by TYPO3. If the 'id' parameter is not given, TYPO3 always uses the root page id for the current domain. It should do so in any case, with realurl or without. Nothing illegal in having http://example.com/?tx_myext[uid]=5&cHash=whtever.

The problem is inside makeCacheHash, it uses $_GET. The fix is quite simple. I am going to make a pull request.

#4 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50030

#5 Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50198

#6 Updated by Dmitry Dulepov about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50199

#8 Updated by Dmitry Dulepov about 1 year ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF