[TYPO3-core] RFC #14858 : bugfix : imageLinkWrap.JSwindow triggers XSS warning or Fails

Jigal van Hemert jigal at xs4all.nl
Sun Jun 27 17:14:44 CEST 2010


Hi,

This is a SVN patch request.

Type: Bugfix

BT reference: http://bugs.typo3.org/view.php?id=14858

Branches: trunk / 4.4 (if RM agrees)

Problem:
JSwindow sends bodytag, title and wrap in URL to showpic script. Because 
wrap usually contains javascript:close() this triggers a rewrite engine 
in IE8. This destroys the close action and results in a Javascript error 
when clicking the enlarged image. Safari seems to produce no error, but 
refuses to close the enlarged image.

Solution:
The rendering of the HTML inside the popup window is copied to 
tslib_cObj and stored in cache. A hash is added to the link and the 
wrap, title and bodyTag parts are removed from the link.
SC_tslib_showpic recognizes the new hash and retrieves the contents 
(except for the image itself) from cache.

SC_tslib_showpic still supports the old situation, if extensions use 
that (we should probably log this in the deprecation log?).

How to test:
Create an image content element with clickEnlarge enabled. IE8 now shows 
the popup without a notice that it modified the link and the close on 
click action works. In Safari the popup now works correctly.

-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14858.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100627/8dd87b18/attachment.asc>


More information about the TYPO3-team-core mailing list