[SECURITY] Fix select_key XSS in PageLayoutView 20/49920/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 13 Sep 2016 09:52:44 +0000 (11:52 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 13 Sep 2016 09:52:46 +0000 (11:52 +0200)
Apply htmlspecialchars() to avoid a XSS when rendering
the value of select_key.

Resolves: #77906
Releases: master, 8.3, 7.6, 6.2
Security-Commit: 161d2b3dfa893c15e08fdd8041a6b3e0ce8e6a1b
Security-Bulletins: TYPO3-CORE-SA-2016-020, 021
Change-Id: I2311302eb5c774e210f76162ec273505ef3e8015
Reviewed-on: https://review.typo3.org/49920
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index f308f96..f01842f 100644 (file)
@@ -1689,7 +1689,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                         }
                     } elseif (!empty($row['select_key'])) {
                         $out .= $this->getLanguageService()->sL(BackendUtility::getItemLabel('tt_content', 'select_key'), true)
-                            . ' ' . $row['select_key'] . '<br />';
+                            . ' ' . htmlspecialchars($row['select_key']) . '<br />';
                     } else {
                         $out .= '<strong>' . $this->getLanguageService()->getLL('noPluginSelected') . '</strong>';
                     }