Review main Merged

64654[BUGFIX] Ensure only empty route requirements for aspects are defined

Oliver Hader CR +2 V +2 Normal +101 −46 updated 06/17/20, 09:32

Commit message

Overriding route requirements with `.+` allows to have slashes in route
parameters. This is different to Symfony's default behavior not allowing
slashes here at all.

However, when having multiple route parameters it can lead to resolving
false-positive routes like shown in the following example:

    routePath: '{first}/{second}'
    URI: https://example.com/first/second/third
    resolves to parameters
    + first: 'first/second'
    + second: 'third'

This change passes existing TYPO3 route `requirements` and uses pattern
`.+` only for those parameters not having a definition - both applies to
parameters using `aspects` only.

Besides that tests in `EnhancerLinkGeneratorTest` mixed internal argument
values with URL parameters (`100` <=> `hundred`) are were "wrong" before.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3