Review main Merged

91146[FEATURE] Replace hard coded `rel="noreferrer"`

Albrecht Köhnlein CR +2 V +2 Normal +163 −9 updated 03/30/26, 09:13

Commit message

Replace the hard coded `rel="noreferrer"` by a more flexible solution. The default behavior can be overwritten by the new TypoScript configuration option `config.linkSecurityRelValue` and all explicitly configured `rel="noopener"` or `rel="noreferrer"` are accepted as well.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Guido Schmechel +1
    • André Buchmann +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Guido Schmechel +1
    • André Buchmann +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1520

  1. Albrecht Köhnlein uploaded patch set 1 10/17/25, 19:37

  2. Albrecht Köhnlein updated the commit message in patch set 2 10/17/25, 19:37

  3. core-ci voted on patch set 1 V +1 10/17/25, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86952

  4. core-ci voted on patch set 2 V +1 10/17/25, 19:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86953

  5. Benni Mack commented on patch set 3 V +1 02/27/26, 17:22

    Published edit on patch set 2.
  6. core-ci voted on patch set 3 V -1 02/27/26, 17:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96988

  7. Albrecht Köhnlein rebased onto patch set 4 V -1 02/27/26, 19:37

  8. core-ci voted on patch set 4 V +1 02/27/26, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96993

  9. Oliver Klee commented on patch set 4 02/28/26, 08:40

    Feature-107771-MakeRelAttributeInExternalLinksConfigurable.rst:14

    ```suggestion For security reasons, external links that open in a new window should be ```

    Feature-107771-MakeRelAttributeInExternalLinksConfigurable.rst:18

    ```suggestion TYPO3's default behavior is to add :code:`rel="noreferrer"` to all such links, ```
  10. Albrecht Köhnlein commented on patch set 4 02/28/26, 09:15

    Feature-107771-MakeRelAttributeInExternalLinksConfigurable.rst:14 Reply

    Fix applied.

    Feature-107771-MakeRelAttributeInExternalLinksConfigurable.rst:18 Reply

    Fix applied.
  11. Albrecht Köhnlein uploaded patch set 5 V +1 02/28/26, 09:18

  12. core-ci voted on patch set 5 V +1 02/28/26, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97015

  13. Simon Schaufelberger voted on patch set 5 CR +1 V +1 03/17/26, 19:57

  14. Guido Schmechel voted on patch set 5 CR +1 V +1 03/17/26, 21:14

  15. André Buchmann commented on patch set 5 V -1 03/27/26, 10:04

    Seems not to work (for RTE links), as the rel attribute gets already defined earlier. I've setup a new TYPO3 v14 instance. It come with the camino theme and a text element with an external link on the home page. Maybe there's a conflict with this change? https://review.typo3.org/c/Packages/TYPO3.CMS/+/93049
  16. André Buchmann commented on patch set 5 03/27/26, 10:25

    Reply

    Additional debug infos: The $linkResult gets the `addAdditionalAnchorTagAttributes()` method: https://github.com/TYPO3/typo3/blob/8ca527c9c84fbe254a1fa52569d484d281bfe72d/typo3/sysext/frontend/Classes/Typolink/LinkFactory.php#L289 The given $linkConfiguration contains no rel directly, but the stdWrapValue applies "rel=norefferer": $linkConfiguration: array ( 'parameter.' => array ( 'data' => 'parameters:href', ), 'title.' => array ( 'data' => 'parameters:title', ), 'target.' => array ( 'data' => 'parameters:target', ), 'ATagParams.' => array ( 'data' => 'parameters:allParams', ), ) $aTagParams: href="https://typo3.org"; target="_blank" rel="noreferrer" My expectation is, that the typoscript setting `config.linkSecurityRelValue = noopener` does apply to RTE links also.
  17. André Buchmann commented on patch set 5 CR +1 V +1 03/27/26, 13:09

    Sorry, got totally fooled by the camino theme. The setupServices defines the rel-attribute for the link: https://github.com/TYPO3/typo3/blob/90173ec94dd54040e382246def5fb7c819b570f8/typo3/sysext/install/Classes/Service/SetupService.php#L282 As `RTE.buttons.link.relAttribute.enabled` is disabled by default, this hardcoded rel doesn't show up in the backen link selection, only in source code. The xdebug didn't show the rel attribute for the RTE link at all until the stdWrap call, that helped to complete the confusion. Thx @info@eric-harrer.de for pointing me in the right direction.
  18. André Buchmann commented on patch set 5 03/28/26, 18:39

    Reply

    Done
  19. Benni Mack voted on patch set 5 CR +2 V +2 03/30/26, 09:13

  20. Benni Mack merged patch set 6 03/30/26, 09:13