Review main Abandoned

86763[BUGFIX] Restore setting default lib.parseFunc.allowTags / denyTags

Garvin Hicking CR 0 V 0 Easy +1 −0 updated 12/10/24, 08:25

Commit message

With #104220 a change of behaviour was introduced that no longer
sets `lib.parseFunc_RTE.allowTags = {$styles.content.allowTags}`.

If custom extensions like a sitepackage however previously used this
code:

```
lib.parseFunc.allowTags := addToList(wbr)
lib.parseFunc_RTE.allowTags := addToList(wbr)
```

then `addToList` would actually set the previously empty `allowTags`
ONLY to "wbr". This would then deny any tag besides "wbr", and not
just allow "wbr" additionally to the previous default.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 1418

  1. Garvin Hicking uploaded patch set 1 10/24/24, 14:21

  2. Garvin Hicking commented on patch set 1 10/24/24, 14:24

    I do not know if this restoration affects the actual feature in a negative way. It at least solves my scenario. Happy for feedback/review.
  3. Benni Mack commented on patch set 1 10/24/24, 14:25

    Reply

    don't worry, this is fine as is.
  4. core-ci voted on patch set 1 V -1 10/24/24, 14:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68546

  5. Garvin Hicking commented on patch set 1 11/05/24, 15:52

    Talked about this in group therapy; Benjamin will try to have a look. Idea is to use '*' as new allowTags default, and then when using addToList a '*,wbr' should be properly evaluated. The idea being, if "*" exists, any other tag wouldn't matter. So instead of checking for allowTags === ['*'] something like 'in_array('*', $allowTags)' should do it. Would be great to get this in for 13.4.1.
  6. Garvin Hicking commented on patch set 1 11/05/24, 15:57

    (A

    Reply

    Hhm, hang on. If we use `(asterisk)` as the default in fsc, then actually all tags would be allowed, overriding the htmlsanitizer. So.. the default cannot use '(asterisk)' here but would need a restricted HTML tag set list?! (Formatting above seems to have removed occurrences of "asterisk" at places, and can't edit the comment) I'm wondering if we should better declare this as a post-breaking change after all so that people do need to adjust their 'addToList' usages
  7. Benni Mack commented on patch set 1 11/22/24, 09:01

    I think this solution is more backwards-compatible and more forward-compatible https://review.typo3.org/c/Packages/TYPO3.CMS/+/87164
  8. Garvin Hicking abandoned the change 11/22/24, 13:38

  9. Garvin Hicking restored the change 11/25/24, 12:20

  10. Garvin Hicking rebased onto patch set 2 V -1 11/25/24, 12:20

  11. Garvin Hicking commented on patch set 3 11/25/24, 12:20

    Published edit on patch set 2.
  12. core-ci voted on patch set 3 V +1 11/25/24, 12:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70136

  13. core-ci voted on patch set 2 V -1 11/25/24, 12:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70135

  14. Garvin Hicking rebased onto patch set 4 V +1 12/10/24, 07:13

  15. Garvin Hicking commented on patch set 4 12/10/24, 07:13

    Reply

    Done
  16. core-ci voted on patch set 4 V +1 12/10/24, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70844

  17. Benni Mack commented on patch set 4 CR +1 V +1 12/10/24, 08:17

    fine for me to getting it in soon.
  18. Garvin Hicking abandoned the change 12/10/24, 08:25