Review main Abandoned

88014[WIP][BUGFIX] Allow "additionalParams" for external URL Typolink parsing

Garvin Hicking CR 0 V 0 Easy +36 −6 updated 02/04/25, 15:48

Commit message

With this patch, evaluating additionalParams, like with

```
<f:link.typolink
   parameter="http://typo3.org/?foo=foo1"
   additionalParams="&foo2=foo2" />
```

will be appended to the URI. This allows editors to
insert external links, while integrators can ensure
with ViewHelpers/TypoScript-configuration that
specific URI arguments (like tracking codes)
are always added.

URI arguments are appended to the input URI. If
existing URI parameter keys are already set,
the ones listed in "additionalParams" will
be put at the end, which in usual HTTP GET
contexts would use the value of the last
parameter.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 2

Review log 45

  1. Garvin Hicking uploaded patch set 1 02/04/25, 12:24

  2. core-ci voted on patch set 1 V -1 02/04/25, 12:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73490

  3. Garvin Hicking commented on patch set 1 CR -1 02/04/25, 13:41

    Wll change to feature + rest + test change. behavioral change not wanted for <v14
  4. Garvin Hicking commented on patch set 1 CR -2 02/04/25, 15:48

    I will abandon this: additionalParams has been implemented to NOT apply to external links since at least TYPO3 6.2 - such a behavioral change might lead to leaking sensitive internal URI arguments. The LinkBuilder cannot easily be enhanced with a new attribute like "externalAdditionalParams" (because of the various input formats). I think the best route to got for an implementation like this is to add a new PSR-14 event like "ModifyPageLinkConfigurationEvent" also to the ExternalUrlLinkBuilder, so that additional parameters can be added on PHP-side, without affecting existing VH/TS implementations.
  5. Garvin Hicking abandoned the change 02/04/25, 15:48