Project

General

Profile

Actions

Bug #50760

closed

Missing htmlspecialchars for link title render_textpic

Added by Alexander Stehlik over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2013-08-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When an image is inserted with a title that contains special chars (like quotes) the title tag of the image tag is escaped correctly.

But the title tag of the surrounding link (tested in lightbox mode) is not escaped!

The reason seems to be the initialization of the $GLOBALS['TSFE']->ATagParams variable in line 668 in the render_textpic() method in the CssStyledContentController.

$GLOBALS['TSFE']->ATagParams .= ' title="' . $titleText . '"';

As far as I can see it should be used like this:

$GLOBALS['TSFE']->ATagParams .= ' title="' . htmlspecialchars($titleText) . '"';

It does not seem to be a security issue because script tags used in the image title are stripped out.

Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22803

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22803

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23344

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23345

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/23348

Actions #6

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/23349

Actions #7

Updated by Alexander Stehlik over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF