Bug #87845

cacheHash.excludedParameters will be ignore when Enhancer is called

Added by Alexey Atsyn over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Start date:
2019-03-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

We detected a problem: when system called PluginEnhancer he wil call exception in the \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::reqCHash function.
I've checked the code and find next:
PageArguments return all query parameters not from config as is and those parameters not compare with cacheHash.excludedParameters

We wrote next patch but don;;t sure is it correct solution:

    public function reqCHash()
    {
        $skip = false;
        if ($this->pageArguments !== null) {
            /** @var \TYPO3\CMS\Frontend\Page\CacheHashCalculator $cacheHashCalculator */
            $cacheHashCalculator = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\CacheHashCalculator::class);
            $relevantParameters = $cacheHashCalculator->getRelevantParameters(
                http_build_query($this->pageArguments->getDynamicArguments(), '', '&', PHP_QUERY_RFC3986)
            );
            $skip = empty($relevantParameters);
        }
        ...

P.S.: we detected this problem with fbclid


Related issues

Related to TYPO3 Core - Bug #87981: 404 Page when Google Analytics Parameters (utm_source) in URLClosed2019-03-22

Actions
Related to TYPO3 Core - Bug #88370: Extbase detail view URL call breaks by attaching params from [FE][cacheHash][excludedParameters] if page is uncachedClosed2019-05-16

Actions
Has duplicate TYPO3 Core - Bug #88070: URL with extbase action and additional query string throws error using route enhancerClosed2019-04-04

Actions
#1

Updated by Susanne Moog over 1 year ago

  • Category changed from Frontend to Link Handling, Site Handling & Routing
#2

Updated by Gerrit Code Review over 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/c/Packages/TYPO3.CMS/+/60296

#3

Updated by Gerrit Code Review over 1 year ago

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

#4

Updated by Gerrit Code Review over 1 year ago

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

#5

Updated by Gerrit Code Review over 1 year ago

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

#6

Updated by Gerrit Code Review over 1 year ago

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

#7

Updated by Gerrit Code Review over 1 year ago

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

#8

Updated by Gerrit Code Review over 1 year ago

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

#9

Updated by Gerrit Code Review over 1 year ago

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

#10

Updated by Gerrit Code Review over 1 year ago

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

#11

Updated by Gerrit Code Review over 1 year ago

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

#12

Updated by Grigory Rechkin over 1 year ago

  • Related to Bug #87981: 404 Page when Google Analytics Parameters (utm_source) in URL added
#13

Updated by Grigory Rechkin over 1 year ago

  • Related to Bug #88070: URL with extbase action and additional query string throws error using route enhancer added
#14

Updated by Gerrit Code Review over 1 year ago

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

#15

Updated by Grigory Rechkin over 1 year ago

  • Related to Bug #88370: Extbase detail view URL call breaks by attaching params from [FE][cacheHash][excludedParameters] if page is uncached added
#16

Updated by Josef Glatz over 1 year ago

  • Target version set to Candidate for patchlevel
#17

Updated by Gerrit Code Review over 1 year ago

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

#18

Updated by Gerrit Code Review over 1 year ago

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

#19

Updated by Helmut Hummel over 1 year ago

  • Related to deleted (Bug #88070: URL with extbase action and additional query string throws error using route enhancer)
#20

Updated by Helmut Hummel over 1 year ago

  • Has duplicate Bug #88070: URL with extbase action and additional query string throws error using route enhancer added
#21

Updated by Gerrit Code Review over 1 year ago

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

#22

Updated by Gerrit Code Review over 1 year ago

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

#23

Updated by Gerrit Code Review over 1 year ago

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

#24

Updated by Gerrit Code Review about 1 year ago

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

#25

Updated by Gerrit Code Review about 1 year ago

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

#26

Updated by Gerrit Code Review about 1 year ago

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

#27

Updated by Robert von Hackwitz about 1 year ago

Hi, same problem with default [FE][cacheHash][excludedParameters] = utm_source,utm_medium,pk_kwd,utm_source,utm_medium,utm_campaign,utm_term,utm_content,gclid,fbclid
and tx_news

Urls like https://sitename/read-news/news-path-segment?utm_source=xxx&utm_medium=twitter (as example) generates
error {"exception":"TYPO3\\CMS\\Core\\Error\\Http\\PageNotFoundException: Request parameters could not be validated (&cHash empty)

Patch doesn't works

#28

Updated by Alexander Opitz about 1 year ago

Hi Robert,

do you overwrite this setting in your LocalConfiguration/AdditionalConfiguration? If yes, do you use a string or an array for that? I ask, cause your line (copied from install tool?) looks a bit confuse, it misses the L and pk_compaign parameter and utm_source/medium is doubled.

#29

Updated by Robert von Hackwitz about 1 year ago

Hi Alexander, thank you for your kind response.
You're right: [FE][cacheHash][excludedParameters] is wrong.
I have restored default settings [FE][cacheHash][excludedParameters] = L,pk_campaign,pk_kwd,utm_source,utm_medium,utm_campaign,utm_term,utm_content,gclid,fbclid

but the problem persist

#30

Updated by Alexander Opitz about 1 year ago

Hi Robert,

can you show the configuration how it is written in your LocalConfiguration.php?

#31

Updated by Robert von Hackwitz about 1 year ago

Hi Alexander,
here's the configuration
'FE' => [
'cacheHash' => [
'excludedParameters' => [
'L',
'pk_campaign',
'pk_kwd',
'utm_source',
'utm_medium',
'utm_campaign',
'utm_term',
'utm_content',
'gclid',
'fbclid'
],
],
'debug' => true,
'disableNoCacheParameter' => true,
'loginSecurityLevel' => 'normal',
'pageNotFoundOnCHashError' => true,
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],

#32

Updated by Alexander Opitz about 1 year ago

Ok, looks fine :-)
So, you are using the given patch on a TYPO3 from git master?

#33

Updated by Gerrit Code Review about 1 year ago

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

#34

Updated by Gerrit Code Review about 1 year ago

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

#35

Updated by Gerrit Code Review about 1 year ago

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

#36

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62221

#37

Updated by Grigory Rechkin about 1 year ago

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

Updated by Benni Mack 11 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF