Commit 7f86d6fe authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Wouter Wolters
Browse files

[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: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: default avatarTomita Militaru <militarutomita@gmail.com>
Reviewed-by: Adrian Mot's avatarAdrian Mot <adrian.mot@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 4c19de7c
......@@ -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;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment