Review main Merged

81578[BUGFIX] Reset UriBuilder for links generated by PasswordRecoveryService

Garvin Hicking CR +2 V +2 Easy +6 −3 updated 10/27/23, 10:48

Commit message

The `EXT:felogin/Classes/Service/RecoveryService.php` makes use of
the local $uriBuilder instance building links, however it does
not `reset()` it's state before building a URL.

It seems this only creates an issue when used in conjunction with
`EXT:vhs` (possibly due to adapted fluid/object caching behavior?).

Fixing this by resetting the instance as recommended via
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ExtensionArchitecture/Extbase/Reference/UriBuilder.html
should take care of this, even though uriBuilder should be a
singleton only operating within the scope of a single
ActionController.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Oliver Hader +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2428

Show 3 earlier messages
  1. Garvin Hicking uploaded patch set 1 10/26/23, 12:17

  2. Oliver Klee voted on patch set 1 V +1 CR +1 10/26/23, 12:22

  3. Thomas Hohn voted on patch set 1 CR +1 10/26/23, 12:23

  1. core-ci voted on patch set 1 V -1 10/26/23, 12:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48233

  2. Oliver Klee voted on patch set 1 V 0 CR 0 10/26/23, 12:37

  3. Garvin Hicking commented on patch set 1 10/26/23, 13:19

    Hm, I'm not sure what/why the errors happen in the Unit tests not resolving "some uri". Help appreciated....
  4. Oliver Hader commented on patch set 1 10/26/23, 14:59

    RecoveryService.php:90

    `$uriBuilder->setRequest()` seems to be missing here...
  5. Oliver Hader voted on patch set 1 V +1 CR +1 10/26/23, 14:59

  6. Oliver Hader voted on patch set 1 V -1 CR -1 10/26/23, 14:59

  7. Oliver Hader voted on patch set 1 V 0 CR 0 10/26/23, 14:59

  8. Oliver Hader commented on patch set 1 10/26/23, 15:09

    RecoveryService.php:90 Reply

    Wrong. The request is not purged in the `reset()` method. Seems the test mocking is wrong then... I'll check...
  9. Oliver Hader uploaded patch set 2 CR +1 V -1 10/26/23, 15:20

  10. Garvin Hicking commented on patch set 2 10/26/23, 15:26

    RecoveryService.php:90 Reply

    Cool thanks for checking... request was specifically mentioned to not be resetted, yes, I checked that too 😵‍💫
  11. core-ci voted on patch set 2 V -1 10/26/23, 15:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48241

  12. Oliver Hader commented on patch set 2 V +1 CR +1 10/26/23, 15:30

    The patch is fine... Side note: The recovery link in the test mail did not contain a host name (since my site config just uses `base: '/'`). This behavior did exist before this patch already and is a general issue to be tackled.

    RecoveryService.php:90 Reply

    Done
  13. Oliver Hader commented on patch set 2 10/26/23, 15:33

    In general the `UriBuilder` should not have a global state. Thus, there might be a "UriBuilderFactory` (or just `UriBuilder::create()`) to retrieve a stateless fresh instance of the `UriBuilder` - similar to `ConnectionPool` and fetching a new `QueryBuilder` for database ops...
  14. Oliver Hader uploaded patch set 3 CR +1 V +1 10/26/23, 15:35

  15. Oliver Hader voted on patch set 3 V +1 CR +1 10/26/23, 15:35

  16. Thomas Hohn commented on patch set 3 V +1 CR +1 10/26/23, 15:38

    Reply

    Done
  17. core-ci voted on patch set 3 V +1 10/26/23, 15:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48245

  18. Christian Kuhn voted on patch set 3 CR +1 10/26/23, 15:46

  19. Christian Kuhn commented on patch set 3 10/26/23, 16:42

    mmmh. v12 applies, v11 is fiddly. @garvin, could you have a look if v11 is manageable and maybe push a backport if so?
  20. Stefan Bürk updated the commit message in patch set 4 CR +1 V +1 10/26/23, 21:06

  21. Stefan Bürk voted on patch set 4 V +1 CR +1 10/26/23, 21:07

  22. core-ci voted on patch set 4 V +1 10/26/23, 21:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48262

  23. Christian Kuhn voted on patch set 4 V +2 CR +2 10/26/23, 22:48

  24. Christian Kuhn merged patch set 5 10/26/23, 22:48

  25. Oliver Hader voted on patch set 5 V +1 CR +1 10/27/23, 10:48