[BUGFIX] Avoid applying parameter inflation during route resolving
Remaining parameters need to be deflated (prepared and normalized to strings and fitting into Symfony route length and literal constraints) during route generation. However, when resolving a route remaining query parameters have to be kept as is - explained in more detail in the following examples based on using enhancer with namespace set to 'app': * https://example.org/page/route-value/app__value=inject + previously assigned `app[value]=inject` -> dirty -> rejected + not inflated anymore, kept as `app_value` * https://example.org/page/route-value/app__other=inject + previously assigned `app[other]=inject` -> okay, wrong namespace + not inflated anymore, kept as `app__other` * https://example.org/page/route-value/[32+ characters]=inject + arbitrary characters lead to OutOfRangeException -> no valid hash + previously `md5('app__@any__value')` assigned `app[@any][value]` -> dirty -> rejected + not inflated anymore, kept as `md5('app__@any__value')` Basically the mentioned OutOfRangeException revealed that misbehavior, hacking `VariableProcessor::resolveHash` would not have solve issues with (incorrectly) merged query parameters - but would have hidden it. Resolves: #87688 Releases: master, 9.5 Change-Id: I3daf02d3b4ed540b9eb098a8b116f485cc79fa72 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62385 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Michael Telgkamp <michael.telgkamp@mindscreen.de> Tested-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Michael Telgkamp <michael.telgkamp@mindscreen.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Frank Nägler <frank.naegler@typo3.org>
Showing
- typo3/sysext/core/Classes/Routing/Enhancer/InflatableEnhancerInterface.php 25 additions, 0 deletions.../Classes/Routing/Enhancer/InflatableEnhancerInterface.php
- typo3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php 2 additions, 5 deletions...3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php
- typo3/sysext/core/Classes/Routing/Enhancer/SimpleEnhancer.php 7 additions, 4 deletions...3/sysext/core/Classes/Routing/Enhancer/SimpleEnhancer.php
- typo3/sysext/core/Classes/Routing/PageRouter.php 5 additions, 0 deletionstypo3/sysext/core/Classes/Routing/PageRouter.php
- typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php 1 addition, 1 deletion.../sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerSiteRequestTest.php 175 additions, 0 deletions...Tests/Functional/SiteHandling/EnhancerSiteRequestTest.php
Please register or sign in to comment