[BUGFIX] Remove HTML in RuntimeException from sysext 'install'
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 23 Sep 2012 10:34:53 +0000 (12:34 +0200)
committerDmitry Dulepov <dmitry@typo3.org>
Fri, 7 Dec 2012 09:36:10 +0000 (10:36 +0100)
It is not possible to use HTML code inside runtime exceptions. This code
will be htmlspecialchared and printed to the user.

Replace <em></em> with double quotes and remove the <br /> tags
completely, because exception messages are single line only.

Fixes: #38472
Releases: 6.1, 6.0, 4.7, 4.6, 4.5

Change-Id: I36fab81586daa4288f3e41c8084c954a47363621
Reviewed-on: http://review.typo3.org/12477
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
typo3/sysext/install/Classes/Installer.php

index 5c20350..d7d450b 100644 (file)
@@ -293,7 +293,11 @@ class Installer {
                        // Check for mandatory PHP modules
                        $missingPhpModules = $this->getMissingPhpModules();
                        if (count($missingPhpModules) > 0) {
-                               throw new \RuntimeException('TYPO3 Installation Error: The following PHP module(s) is/are missing: <em>' . implode(', ', $missingPhpModules) . '</em><br /><br />You need to install and enable these modules first to be able to install TYPO3.', 1294587482);
+                               throw new \RuntimeException(
+                                       'TYPO3 Installation Error: The following PHP module(s) is/are missing: "' .
+                                               implode('", "', $missingPhpModules) .
+                                               '". You need to install and enable these modules first to be able to install TYPO3.',
+                                       1294587482);
                        }
                        // Load saltedpasswords if possible
                        $saltedpasswordsLoaderFile = $this->backPath . 'sysext/saltedpasswords/classes/class.tx_saltedpasswords_autoloader.php';