[TASK] Remove version number from generator tag 45/37945/7
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 19 Mar 2015 09:55:31 +0000 (10:55 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 15 Jun 2015 09:54:17 +0000 (11:54 +0200)
This change will not increase the security of TYPO3 CMS.
This information can be misused by an attacker for a more targeted attack.

Resolves: #64429
Releases: master,6.2
Change-Id: I9151ed99e454e878b10ec1894cbec2ad83165e57
Reviewed-on: http://review.typo3.org/37945
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Tests/Unit/Page/PageGeneratorTest.php

index ad2d860..430e08a 100644 (file)
@@ -1239,7 +1239,7 @@ function jumpToUrl(URL) {
         * @return string <meta> tag with name "generator
         */
        public function generator() {
-               $str = 'TYPO3 ' . TYPO3_branch . ', ' . TYPO3_URL_GENERAL . ', &#169; Kasper Sk&#229;rh&#248;j ' . TYPO3_copyright_year . ', extensions are copyright of their respective owners.';
+               $str = 'TYPO3 CMS, ' . TYPO3_URL_GENERAL . ', &#169; Kasper Sk&#229;rh&#248;j ' . TYPO3_copyright_year . ', extensions are copyright of their respective owners.';
                return '<meta name="generator" content="' . $str . '" />';
        }
 
index 330c82d..632b4b2 100644 (file)
@@ -1185,7 +1185,7 @@ class PageGenerator {
                $endingSlash = $xhtml ? ' /' : '';
 
                $metaTags = array(
-                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '"' . $endingSlash . '>'
+                       '<meta name="generator" content="TYPO3 CMS"' . $endingSlash . '>'
                );
 
                /** @var TypoScriptService $typoScriptService */
index df101ac..2aae33c 100644 (file)
@@ -53,7 +53,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                FALSE,
                                array(
-                                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                       '<meta name="generator" content="TYPO3 CMS">',
                                        '<meta name="author" content="Markus Klein">',
                                )
                        ),
@@ -63,7 +63,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                TRUE,
                                array(
-                                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '" />',
+                                       '<meta name="generator" content="TYPO3 CMS" />',
                                        '<meta name="author" content="Markus Klein" />',
                                )
                        ),
@@ -74,7 +74,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                FALSE,
                                array(
-                                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                       '<meta name="generator" content="TYPO3 CMS">',
                                        '<meta name="author" content="Markus Klein">',
                                )
                        ),
@@ -85,7 +85,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                FALSE,
                            array(
-                                   '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                   '<meta name="generator" content="TYPO3 CMS">',
                                        '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">'
                            )
                        ),
@@ -96,7 +96,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                TRUE,
                                array(
-                                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '" />',
+                                       '<meta name="generator" content="TYPO3 CMS" />',
                                        '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />'
                                )
                    ),
@@ -106,7 +106,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                FALSE,
                                array(
-                                       '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                       '<meta name="generator" content="TYPO3 CMS">',
                                        '<meta http-equiv="refresh" content="10">',
                                )
                        ),
@@ -116,7 +116,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                            ),
                            FALSE,
                            array(
-                                   '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                   '<meta name="generator" content="TYPO3 CMS">',
                                    '<meta name="DC.author" content="Markus Klein">',
                            )
                    ),
@@ -126,7 +126,7 @@ class PageGeneratorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                            ),
                            FALSE,
                            array(
-                                   '<meta name="generator" content="TYPO3 CMS ' . TYPO3_branch . '">',
+                                   '<meta name="generator" content="TYPO3 CMS">',
                                    '<meta name="OG:title" content="Magic Tests">',
                            )
                    ),