From 7f86d6fe622dc254e331d41ec9fe95e8bfc3d733 Mon Sep 17 00:00:00 2001 From: Anja Leichsenring <aleichsenring@ab-softlab.de> Date: Wed, 11 May 2016 10:11:08 +0200 Subject: [PATCH] [BUGFIX] Raise hostname length to 255 characters 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> --- .../Classes/Controller/Action/Step/DatabaseConnect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php b/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php index 5dba4adb7b5f..112cddc40c26 100644 --- a/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php +++ b/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php @@ -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; } } -- GitLab