Bug #47844
closedQuery parameters of external link may get altered
100%
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</link>
is changed after saving to:
<link http://domain.tld/index.php?id=1&foo=123,0,&foo=123>test</link>
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</link>
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.