Issue Bug Closed

#47844Query parameters of external link may get altered

Flummi no-lastname-given 05/02/13, 19:54 updated 10/02/18, 12:14

Description

Asuming the website is running on http://domain.tld
When now putting a link as external URL in the link picker e.g. http://domain.tld/index.php?id=2&foo=123
the rte adds all parameters except id another time to the url.

I.E:

<link>http://domain.tld/index.php?id=1&foo=123>test

is changed after saving to:

<link>http://domain.tld/index.php?id=1&foo=123,0,&foo=123>test

When saving another time, the RTE changes it again to:

<link>http://domain.tld/index.php?id=1&foo=123,0,&foo=123,0,&foo=123,0,&foo=123>test

And so on until the links are very long and Typo3 crashes.

The problem seems to be in typo3/sysext/core/Classes/Html/RteHtmlParser.php
in line 680:

$href = ($attribArray[‘data-htmlarea-external’] ? $attribArray[‘href’] : $info[‘url’]) . ($info[‘query’] ? ‘,0,’ . $info[‘query’] : ‘’);

I guess in line 1692 the class somehow assumes the link is a page link and sets the $info[‘query’] param, which then leeds to the error.

Reviews 4