Review main Abandoned

68720[BUGFIX] Prevent possible bypass of new password validation

Xavier Perseguers CR 0 V 0 Easy +6 −2 updated 11/17/21, 10:47

Commit message

This is needed since the deprecation of `->forward()` method
which throwed a `StopActionException` and allowed the call
to stop prematurely. This change effectively makes the
initialization methods within Extbase not necessarily "void"
anymore.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 2

Review log 1115

  1. Xavier Perseguers uploaded patch set 1 04/07/21, 09:58

  2. Mathias Brodala commented on patch set 1 04/07/21, 10:01

    ActionController.php:481

    Just from reading: shouldn't any response be returned? Otherwise this special behavior for the ForwardResponse alone needs a lot of explanation and documentation.
  3. Xavier Perseguers commented on patch set 1 04/07/21, 10:02

    There's another problem afterwards, even if it fixes that particular issue: the validation errors are gone and not displayed to the user anymore.

    ActionController.php:481 Reply

    Please read bug description
  4. TYPO3com voted on patch set 1 V +1 04/07/21, 10:04 Completed build in 05m 56s on Wed, 7 Apr, 10:04 AM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10520

  5. Mathias Brodala commented on patch set 1 04/07/21, 10:05

    ActionController.php:481 Reply

    I did, but ignoring the specific issue at hand my remark is still valid. We do a change in generic code after all, so it must be viewed in a broader scale.
  6. Xavier Perseguers commented on patch set 1 04/07/21, 10:09

    ActionController.php:481 Reply Unresolved

    take that as a WIP then. I don't say this is the ultimate solution, see my other "problem" I commented about. But this just shows that the change introduced 4 months ago is totally breaking and deprecating `->forward()` has been done too quickly and without any proper testing. Did not read the PSR7 patch completely but I suspect the ForwardResponse introduced in the initialization is one of the only one in the workflow of a password reset, which is a security problem and this part has obviously not been tested :(
  7. core-ci voted on patch set 1 V +1 04/07/21, 10:12 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2072

  8. Xavier Perseguers uploaded patch set 2 04/07/21, 10:43

  9. TYPO3com voted on patch set 2 V +1 04/07/21, 10:49 Completed build in 05m 40s on Wed, 7 Apr, 10:49 AM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10521

  10. Xavier Perseguers commented on patch set 2 04/07/21, 10:51

    Reply

    fixed with patchset 2
  11. core-ci voted on patch set 2 V +1 04/07/21, 10:54 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2073

  12. Alexander Schnitzler commented on patch set 2 04/07/21, 12:43

    Well, this issue has many different aspects. Therefore I'd opt for dealing with those separately. First of all we need to deal with the Extbase side here and ask ourselves what kind of behaviour we actually want to happen. True, when I introduced the forward response I made a response necessary for all actions, not for initialize actions. I personally don't know in what way people use that method but it was never intended to return anything but to prepare for the soon to be called method. Say we want to introduce the possibility to let the user return a response at that point, I think we need to take all responses into account, just as Mathias said. We shouldn't just deal with a forward response then. Question still is if we want to do that in the first place. In the past, forwarding was possible due to the thrown exception, so this never was an issue before. I am personally not sure what we want here from an architectural standpoint. So maybe it's wise the revert the deprecation for now and use the forward method in the core to have the former behaviour and to not trigger deprecation calls from the core just yet. In the long run I'd like to avoid terminating requests via Exception unless we have something like the ImmediateResponseException from the core. But that needs to be implemented in Extbase then. Nevertheless we need an architectural discussion and decision here and from there on move on.
  13. Benni Mack commented on patch set 2 10/08/21, 08:15

    ping - hasn't this issue been resolved in the meantime?
  14. Oli Bartsch commented on patch set 2 11/17/21, 10:45

    Reply

    Just tested this with current master and the issue seems to be already solved. I was not able to create a new password, not matching the criteria.
  15. Oli Bartsch abandoned the change 11/17/21, 10:47

    As mentioned in my last comment, this issue was already solved in the meantime. See the forge issue for corresponding patches.