[TASK] Remove version number from generator tag 43/40243/2
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:55:17 +0000 (11:55 +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/40243
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Tests/Unit/Page/PageGeneratorTest.php

index 0468908..b1189c2 100644 (file)
@@ -1292,7 +1292,7 @@ function jumpToUrl(URL) {
         * @todo Define visibility
         */
        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 559e532..1cd4adc 100644 (file)
@@ -1117,7 +1117,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 b604b6c..b570b6b 100644 (file)
@@ -52,7 +52,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">',
                                )
                        ),
@@ -62,7 +62,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" />',
                                )
                        ),
@@ -73,7 +73,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">',
                                )
                        ),
@@ -84,7 +84,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">'
                            )
                        ),
@@ -95,7 +95,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" />'
                                )
                    ),
@@ -105,7 +105,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">',
                                )
                        ),
@@ -115,7 +115,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">',
                            )
                    ),
@@ -125,7 +125,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">',
                            )
                    ),