Review main Abandoned Breaking

64903[!!!][WIP][BUGFIX] Use strict route requirements avoiding slashes in slugs

Oliver Hader CR 0 V 0 Hard +606 −113 updated 08/06/24, 20:20

Commit message

Having a route path like `/list/{first}/{second}` and a URL like
`https://example.org/page/list/a/b/c` leads to ambiguous parameters

* `first: a/b`, `second: c` **or**
* `first: a`, `second: b/c`

That's basically the reason why route `requirements` need to be more
specific and strict. Besides that additional TCA settings were needed
to avoid slashes being used in the backend user interface.

TL;DR

* route configuration for slugs relying on slashes must be adjusted
* route `defaults` focus on internal parameters (`1`, `2`, ...)
* route `requirements` focus on external URL parts (`one`, `two`, ...)

BREAKING CHANGES

* In case no route `requirements` are given, Symfony's strict defaults
  are applied `[^/]+` - this will be breaking for slugs using slashes.
  For those scenarios that rely on slashes in slugs corresponding
  settings in route `requirements` have to set to `.+` or tailored
  regular expressions
* Previous behavior and handling of `requirements` for variables having
  `aspects` - introduced with issues #91246 and #90531 - were removed.
* "Important: #86895 - Route aspects take precedence over requirements"
  documentation file is outdated and is removed

IMPORTANT CHANGES

* TCA setting `allowSlash` is introduced in order to allow/deny using
  slashes in user-land applications - backward-compatible behavior
  enables the setting based on existing settings
* TCA migrations perform sanitization on conflicting settings

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 9

Review log 1829

Show 24 earlier messages
  1. Oliver Hader uploaded patch set 1 06/17/20, 12:59

  2. TYPO3com voted on patch set 1 V -1 06/17/20, 13:13 Completed build in 13m 25s on Wed, 17 Jun, 01:13 PM Test Summary: 36 of 73527 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3939

  3. Oliver Hader uploaded patch set 2 06/18/20, 09:54

  4. TYPO3com voted on patch set 2 V -1 06/18/20, 10:07 Completed build in 13m 16s on Thu, 18 Jun, 10:07 AM Test Summary: 36 of 73575 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3948

  1. Oliver Hader uploaded patch set 3 06/18/20, 12:19

  2. Oliver Hader updated the commit message in patch set 4 06/18/20, 12:22

  3. TYPO3com voted on patch set 3 V -1 06/18/20, 12:32 Completed build in 13m 04s on Thu, 18 Jun, 12:32 PM Test Summary: 72 of 73575 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3949

  4. TYPO3com voted on patch set 4 V -1 06/18/20, 12:39 Completed build in 16m 49s on Thu, 18 Jun, 12:39 PM Test Summary: 72 of 73575 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3950

  5. Oliver Hader uploaded patch set 5 06/18/20, 13:20

  6. TYPO3com voted on patch set 5 V -1 06/18/20, 13:33 Completed build in 12m 13s on Thu, 18 Jun, 01:33 PM Test Summary: 18 of 73575 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3951

  7. Oliver Hader uploaded patch set 6 06/18/20, 14:03

  8. TYPO3com voted on patch set 6 V -1 06/18/20, 14:15 Completed build in 12m 34s on Thu, 18 Jun, 02:15 PM Test Summary: 9 of 73557 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3952

  9. Oliver Hader uploaded patch set 7 06/18/20, 21:16

  10. TYPO3com voted on patch set 7 V -1 06/18/20, 21:17 Completed build in 25s on Thu, 18 Jun, 09:17 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3954

  11. Oliver Hader uploaded patch set 8 06/18/20, 21:18

  12. TYPO3com voted on patch set 8 V +1 06/18/20, 21:31 Completed build in 12m 55s on Thu, 18 Jun, 09:31 PM Test Summary: 73268 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3955

  13. Benni Mack commented on patch set 8 06/29/20, 07:43

    I'm not sure if we actually need this change (at least in 9.5/10.4 I'm not sure about it). The most important part is that people should use "requirements: " by default with "[^/]+" so they are safe to roll (this was my experience in latest v9.5)
  14. Oliver Hader updated the commit message in patch set 9 07/03/20, 15:23

  15. Oliver Hader commented on patch set 9 07/03/20, 15:24

    That's fine... changing the defaults back for v9.5 probably might cause other effects (that's why this change was marked as "potentially breaking"). Besides that existing documentation needs to be adjusted, which seems to be wrong is some aspects...
  16. TYPO3com voted on patch set 9 V -1 07/03/20, 16:08 Completed build in 34m 24s on Fri, 3 Jul, 04:08 PM Test Summary: 1 of 68973 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4046

  17. TYPO3com voted on patch set 9 V +1 07/03/20, 17:47 Completed build in 3h 57m 52s on Fri, 3 Jul, 05:47 PM Test Summary: 73277 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4046

  18. Benni Mack commented on patch set 9 CR -1 09/03/20, 14:31

    You add docs to 9.5.x even though the target is v10.4 + master. What was your plan? I'd recommend going with master-only.
  19. Oliver Hader commented on patch set 9 CR -1 10/02/20, 19:04

    Agree, let's drop 9.5 and 10.4 - the scope was based on "old assumptions" (every bugfix has to be in stable branches). I',m not sure about this breaking change - probably it's not required anymore and people hopefully found their way with proper requirements & defaults
  20. Oliver Hader updated the commit message in patch set 10 10/02/20, 19:04

  21. Oliver Hader marked it work in progress 10/02/20, 19:05

  22. TYPO3com voted on patch set 10 V +1 10/02/20, 19:22 Completed build in 17m 38s on Fri, 2 Oct, 07:22 PM Test Summary: 74142 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6225

  23. Benni Mack wrote 11/29/21, 10:04

    Change destination moved from master to main
  24. Benni Mack updated the commit message in patch set 11 11/29/21, 13:22

  25. Oliver Hader abandoned the change 08/06/24, 20:20

    "Eh Oasch"... I don't this is required anymore...