Fixed bug #5522: 1-2-3 wizard does not accept host name with socket option
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 28 Apr 2007 00:27:03 +0000 (00:27 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 28 Apr 2007 00:27:03 +0000 (00:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2283 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/mod/class.tx_install.php

index 30d0f35..d01ff17 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 
        * Change default date formatting of CE header to be localized (needs compat version of 4.2)
        * Add "address" to the list of allowed tags of parseFuncs (needs compat version of 4.2)
+       * Fixed bug #5522: 1-2-3 wizard does not accept host name with socket option
 
 2007-04-27  Michael Stucki  <michael@typo3.org>
 
index 2d07a54..82b45d9 100755 (executable)
@@ -2109,9 +2109,9 @@ From sub-directory:
                                                                } else $this->messages[]= $errorMessages[] = "Password '".$value."' was longer than 50 chars (...not saved)";
                                                        break;
                                                        case 'typo_db_host':
-                                                               if (!ereg("[^[:alnum:]_\.:-]",$value) && strlen($value)<50)     {
+                                                               if (preg_match('/^[a-zA-Z0-9_\.-]+(:.+)?$/',$value) && strlen($value)<50)       {
                                                                        if (strcmp(TYPO3_db_host,$value))               $this->setValueInLocalconfFile($lines, '$typo_db_host', $value);
-                                                               } else $this->messages[]= $errorMessages[] = "Host '".$value."' was not alphanumeric, a-zA-Z0-9_-:., or longer than 50 chars (...not saved)";
+                                                               } else $this->messages[]= $errorMessages[] = "Host '".$value."' was not alphanumeric (a-z, A-Z, 0-9 or _-.), or longer than 50 chars (...not saved)";
                                                        break;
                                                        case 'typo_db':
                                                                if (strlen($value)<50)  {