Bug #87410
closedBackendUtility::thumbCode variable $tparams ignored/unused
100%
Description
When calling
\TYPO3\CMS\Backend\Utility\BackendUtility::thumbCodeits 8th parameter, variable $tparams ("Optional: $tparams is additional attributes for the image tags"), does not do anything or to much depending on case: calling it with FAL reference or parameter $uploaddir.
- When calling with FAL reference the parameter does not do anything, since the variable is not used in the code (BackendUtility.php:1348-1411)
Line 1398$imgTag = '<img ' . GeneralUtility::implodeAttributes($attributes, true) . '/>';
should make use of that variable. - When using the $uploaddir parameter (BackendUtility.php:1413-1476) it is used in generating the image tag, cf. line 1458:
$image = '<img src="' . htmlspecialchars($imageUrl) . '" hspace="2" border="0" title="' . htmlspecialchars($fileObject->getName()) . '"' . $tparams . ' alt="" />';
Yet, the possible additional attributes "hspace" and "border", for example, are already present in that line.
=> The variable should also be used in the first case.
=> Any string which is passed through the variable should be chcecked if it is a viable attribute of an img
-tag before being added to the final result.
Updated by Jan Siemon almost 6 years ago
- Description updated (diff)
- Complexity changed from easy to medium
Updated by Gerrit Code Review almost 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59417
Updated by Gerrit Code Review almost 6 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59431
Updated by Georg Ringer almost 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8a6509f274967dc63eb53b5f169fc9ca419579fc.
Updated by Gerrit Code Review almost 6 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Teams/Security/TYPO3v4-Core has been pushed to the review server.
It is available at https://review.typo3.org/59434
Updated by Georg Ringer almost 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset 4a77abe6b7ac9b44b29c20aa82313a140f671543.