Review main Merged

71418[BUGFIX] Make Linkvalidator event listener more robust

Sybille Peters CR +2 V +2 Normal +93 −8 updated 10/14/21, 08:12

Commit message

A page link may not contain the query parameter uid.
Make sure that the event listener is robust and handles
unfilled array elements.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1618

  1. Sybille Peters uploaded patch set 1 10/02/21, 16:56

  2. core-ci voted on patch set 1 V +1 10/02/21, 17:29 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17491

  3. Guido Schmechel commented on patch set 1 10/04/21, 09:18

    CheckBrokenRteLinkEventListener.php:63

    Do we need a "$event->getLinkData() ?? [];" ?
  4. Sybille Peters commented on patch set 1 10/04/21, 10:33

    CheckBrokenRteLinkEventListener.php:63 Reply

    Good point. It probably should always be an array, but I will check.
  5. Benni Mack commented on patch set 1 CR +1 10/04/21, 13:19

    CheckBrokenRteLinkEventListener.php:63 Reply

    the return value is always an array, nothing to change here.
  6. Guido Schmechel voted on patch set 1 CR +1 10/04/21, 15:28

  7. Wouter Wolters voted on patch set 1 CR +1 10/04/21, 17:30

  8. Oli Bartsch commented on patch set 1 CR +1 10/13/21, 15:35

    Code looks good. However, I was not able to reproduce the bug, mentioned in the issue.
  9. Sybille Peters commented on patch set 1 10/13/21, 16:06

    @Oli Did you try what Frank wrote in comment 3: https://forge.typo3.org/issues/95166#note-3 Enter broken link directly in the database (because RTE fixes it otherwise), e.g <a title="ICMU" href="t3://page?alias=-">(ICMU)</a> I could reproduce it that way though this is something which should not (in theory) happen.
  10. Stefan Bürk commented on patch set 1 10/13/21, 17:47

    Should we not cover this case with a functional test ?
  11. Oli Bartsch uploaded patch set 2 10/13/21, 19:56

  12. Oli Bartsch commented on patch set 2 10/13/21, 19:58

    Reply

    Yep this way I can reproduce the bug. Did not understand that he added it directly to DB.

    Reply

    Added a small test covering this specific use case. This could surely be extended in a meaningful way in the future.
  13. core-ci voted on patch set 2 V +1 10/13/21, 20:19 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18074

  14. Oli Bartsch voted on patch set 2 V +1 CR +1 10/13/21, 20:24

  15. Stefan Bürk voted on patch set 2 V +1 CR +1 10/13/21, 20:34

  16. Benni Mack voted on patch set 2 V +2 CR +2 10/14/21, 06:17

  17. Benni Mack merged patch set 3 10/14/21, 06:17

  18. Benni Mack commented on patch set 3 10/14/21, 08:12

    This is very weird. Havent' seen this one. This change says it is merged, but it isn't...