Issue Bug Under Review Orphaned

#100097Long external parameters causes TYPO3 crash in Extbase Routing Enhancer

Marc Willmann 03/06/23, 12:27 updated 08/15/25, 12:49

Description

If an external parameter is added to a page, which is resolved using an Routing-Enhancer, this might cause a crash, if the parameter name is too long.

Steps to reproduce:

You need a page with configured Extbase Plugin Enhancer.
If you call this page it should work in the frontend with the normal output of the extbase plugin used.
If you call this page with a manipulated URL (add a long parameter, e.g. ?L_Instagram_FeedAd_EstimatedAdRecall=whatever you see an error in the frontend.

I expect the non-TYPO3 parameter is simply ignored.

I have stripped this down to https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Routing/Enhancer/VariableProcessor.php#L61

if the parameter is longer than 31 chars and it’s not a valid hash, the OutOfRangeException is throwed, which leads to an error in the frontend.

As for shorter parameters the input argument is simply returned, I suggest to change the method resolveHash to return the value from $this->hashes, if the key $hash exists, and $hash otherwise.

This would make the method shorter and more stable.

I’m unsure, if this might have unwanted side effects.

I found this in a TYPO3 10.4.36 instance, but the method and the error is also in current main. It seems not related to the PHP version.

Reviews 1

History 59

  1. Marc Willmann commented <span data-processor="relativetime" data-value="2023-03-07T07:57:22+00:00" > 03/07/23, 07:57 </span>

    In my patch proposal the test suite fails because the OutOfRangeException is not thrown anymore. This is correct. Of course, the test can be changed, but I want to leave this untouched for the moment to discuss if the suggested solution is dangerous in any way.

  2. Florian Rival commented <span data-processor="relativetime" data-value="2025-05-20T13:02:07+00:00" > 05/20/25, 13:02 </span>

    Same error for me :

    > #1537633463 OutOfRangeException
    > Hash not resolvable

    Url before enhance routing :
    > https://mysite.org/publications/nos-publications/p?tx_myextpublication_publicationshow%5Baction%5D=show&tx_myextpublication_publicationshow%5Bcontroller%5D=Publication&tx_myextpublication_publicationshow%5Bpublication%5D=123&cHash=b710f1d53bd9a5348b91d663c3e2c1df

    The route enhancer :

    routeEnhancers:
      PublicationDetail:
        type: Extbase
        extension: tx_myextMyExtpublicationPublication
        plugin: PublicationShow
        routes:
          -
            routePath: '/publication/{publication_title}'
            _controller: 'Publication::show'
            _arguments:
              publication_title: publication
        aspects:
          publication_title:
            type: PersistedAliasMapper
            tableName: tx_myextpublication_domain_model_publication
            routeFieldName: path_segment

    Then tx_myextpublication_publicationshow is longer than 31 characters but it works with some records and not with others.
    the path_segment is only 26 characters long.

  3. Dmitry Dulepov commented <span data-processor="relativetime" data-value="2025-08-15T11:42:00+00:00" > 08/15/25, 11:42 </span>

    I can confirm the issue in TYPO3 13.4.17 with 32 character prefix from the plugin. Stack trace is at https://forge.typo3.org/issues/92367#note-11