[BUGFIX] Install Tool: Error message gives wrong info 25/18325/3
authorThomas Löffler <loeffler@spooner-web.de>
Sun, 17 Feb 2013 11:04:20 +0000 (12:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Mar 2013 23:40:38 +0000 (00:40 +0100)
Based on issue #45135 the change not only includes the
check for the variable length for typo_db_password, but
for typo_db, typo_db_host and typo_db_username as well.

Resolves: #45135
Releases: 4.5,4.7,6.0,6.1
Change-Id: Idcf45892a7b8836be31d2648b04252d1415e372b
Reviewed-on: https://review.typo3.org/18325
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/install/Classes/Installer.php

index 8a5cd9d..71f1648 100644 (file)
@@ -3183,7 +3183,7 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                foreach ($this->INSTALL['Database'] as $key => $value) {
                                        switch ((string) $key) {
                                        case 'typo_db_username':
-                                               if (strlen($value) < 50) {
+                                               if (strlen($value) <= 50) {
                                                        if (strcmp(TYPO3_db_username, $value)) {
                                                                $localConfigurationPathValuePairs['DB/username'] = $value;
                                                        }
@@ -3195,7 +3195,7 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                                }
                                                break;
                                        case 'typo_db_password':
-                                               if (strlen($value) < 50) {
+                                               if (strlen($value) <= 50) {
                                                        if (strcmp(TYPO3_db_password, $value)) {
                                                                $localConfigurationPathValuePairs['DB/password'] = $value;
                                                        }
@@ -3206,7 +3206,7 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                                }
                                                break;
                                        case 'typo_db_host':
-                                               if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) < 50) {
+                                               if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) <= 50) {
                                                        if (strcmp(TYPO3_db_host, $value)) {
                                                                $localConfigurationPathValuePairs['DB/host'] = $value;
                                                        }
@@ -3219,7 +3219,7 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                                }
                                                break;
                                        case 'typo_db':
-                                               if (strlen($value) < 50) {
+                                               if (strlen($value) <= 50) {
                                                        if (strcmp(TYPO3_db, $value)) {
                                                                $localConfigurationPathValuePairs['DB/database'] = $value;
                                                        }
@@ -7208,4 +7208,4 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
        }
 
 }
-?>
\ No newline at end of file
+?>