#100097Long external parameters causes TYPO3 crash in Extbase Routing Enhancer
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
-
Gerrit Code Review pushed patch set 1 for main to change 78036 status
NewUnder Review <span data-processor="relativetime" data-value="2023-03-06T13:22:12+00:00" > 03/06/23, 13:22 </span> -
Gerrit Code Review pushed patch set 2 for main to change 78036 <span data-processor="relativetime" data-value="2023-03-06T13:26:43+00:00" > 03/06/23, 13:26 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 78036 <span data-processor="relativetime" data-value="2023-05-03T09:40:02+00:00" > 05/03/23, 09:40 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 78036 <span data-processor="relativetime" data-value="2024-10-18T14:06:21+00:00" > 10/18/24, 14:06 </span>
-
Georg Ringer changed Duplicated by #92367 <span data-processor="relativetime" data-value="2025-04-18T07:23:30+00:00" > 04/18/25, 07:23 </span>
-
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 resolvableUrl 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=b710f1d53bd9a5348b91d663c3e2c1dfThe 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_segmentThen 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. -
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
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2025-08-15T12:49:30+00:00" > 08/15/25, 12:49 </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.