Review main Merged

87885[BUGFIX] Prevent CSP module showing link when EXT:lowlevel is missing

Garvin Hicking CR +2 V +2 Easy +22 −11 updated 01/29/25, 22:15

Commit message

With #105692 a cross-reference link was added that guides people
to the "Configuration" backend module section for the CSP
configuration.

The used route "system_config" however is set via EXT:lowlevel,
which is not necessarily installed when the CSP backend module
is used.

Unfortunately, using a `<f:be.link>` with a missing route
throws an exception `RouteNotFoundException` that will
crash a whole backend module. This might be the proper
behavior for many cases, to prevent non-working links
in links used for JavaScript or form actions.

This patch checks for existence of EXT:lowlevel and
changes the intro text accordingly to hint at the
missing extension.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1315

  1. Garvin Hicking uploaded patch set 1 01/26/25, 11:05

  2. core-ci voted on patch set 1 V +1 01/26/25, 11:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73020

  3. Andreas Kienast commented on patch set 1 CR -1 01/27/25, 08:29

    content-security-policy.xlf:23

    This is too generic. If I read that message, I don't get the clear hint I **have to** install EXT:install. This way, it reads like "it's either there or it isn't".
  4. Garvin Hicking commented on patch set 1 01/27/25, 08:49

    content-security-policy.xlf:23 Reply

    Hm, not sure I understand. Do you have a specific alternate wording suggestion? Or do you mean to remove the message altogether? IMO there should be a message that hints people at "hey, install ext:lowlevel to see a cool list of csp mutations". But if removing the message for people without that extension finds more consent, I can live with removing it. We just need to "unbreak" the currenr situation somehow.
  5. Andreas Kienast commented on patch set 1 01/27/25, 12:39

    content-security-policy.xlf:23 Reply

    It's not about removing the message, but about making it explicit EXT:lowlevel **needs** to be installed. Example: ``` A list of the existing Content Security Policy Mutations can be viewed in the %s module. Please install EXT:lowlevel to do so. ```
  6. Garvin Hicking commented on patch set 1 01/27/25, 13:18

    content-security-policy.xlf:23 Reply

    I see, however I find this variant probably sounds like EXT:lowevel SHOULD be installed, while this is more a COULD. How about: ``` If you install the core EXT:lowlevel extension, you can can see a list of the existing Content Security Policy Mutations in the %s module. ``` This would first state that EXT:lowlevel is missing, and then what you optionally could get if you install it, and still making it optional, and still keeping a hint at it...?
  7. Christian Kuhn uploaded patch set 2 CR -1 V +1 01/28/25, 15:01

  8. Christian Kuhn commented on patch set 1 01/28/25, 15:01

    content-security-policy.xlf:23 Reply

    sounds good to me, pushed. Andy?
  9. Christian Kuhn voted on patch set 2 CR +1 V +1 01/28/25, 15:05

  10. Christian Kuhn commented on patch set 2 01/28/25, 15:06

    fine with me, let's see if andy is happy, too.
  11. core-ci voted on patch set 2 V +1 01/28/25, 15:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73103

  12. Andreas Kienast voted on patch set 2 CR +1 V +1 01/28/25, 15:40

  13. Andreas Kienast commented on patch set 2 01/28/25, 15:41

    content-security-policy.xlf:23 Reply

    Fine for me. Thanks for handling this.
  14. Garvin Hicking voted on patch set 2 CR +2 V +2 01/29/25, 22:15

  15. Garvin Hicking merged patch set 3 01/29/25, 22:15