[BUGFIX] Raise hostname length to 255 characters 70/48070/3
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 11 May 2016 08:11:08 +0000 (10:11 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 11 May 2016 18:38:40 +0000 (20:38 +0200)
When installing TYPO3 in a cloud environment, the 50 character
limit is not high enough. Therefor it is raised to 255 chars,
what most protocols define as the max limit.

Releases: master, 7.6
Resolves: #76132
Change-Id: I59383911e791b635fc80cb6b6b3c76d4433c8e0d
Reviewed-on: https://review.typo3.org/48070
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Tomita Militaru <militarutomita@gmail.com>
Reviewed-by: Adrian Mot <adrian.mot@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php

index 5dba4ad..112cddc 100644 (file)
@@ -115,13 +115,13 @@ class DatabaseConnect extends AbstractStepAction
 
             if (isset($postValues['host'])) {
                 $value = $postValues['host'];
-                if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) <= 50) {
+                if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) <= 255) {
                     $localConfigurationPathValuePairs['DB/Connections/Default/host'] = $value;
                 } else {
                     /** @var $errorStatus \TYPO3\CMS\Install\Status\ErrorStatus */
                     $errorStatus = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                     $errorStatus->setTitle('Database host not valid');
-                    $errorStatus->setMessage('Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than fifty characters.');
+                    $errorStatus->setMessage('Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than 255 characters.');
                     $result[] = $errorStatus;
                 }
             }