diff --git a/setup/index.php b/setup/index.php index 97451b8f5d..e08edf8e17 100644 --- a/setup/index.php +++ b/setup/index.php @@ -290,7 +290,8 @@ switch($GLOBALS['egw_info']['setup']['stage']['db']) switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi']) { case 'dbcreate': - $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'],'utf8'); // create all new db's with utf8 + $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'], 'utf8', // create all new db's with utf8 + !preg_match('/^[0-9.a-z_]+$/i', $_POST['db_grant_host']) ? 'localhost' : $_POST['db_grant_host']); break; case 'drop': $setup_info = $GLOBALS['egw_setup']->detection->get_versions($setup_info); diff --git a/setup/templates/default/setup_db_blocks.tpl b/setup/templates/default/setup_db_blocks.tpl index ef92e5c7ea..2e2ba788bc 100644 --- a/setup/templates/default/setup_db_blocks.tpl +++ b/setup/templates/default/setup_db_blocks.tpl @@ -1,6 +1,6 @@   +    @@ -15,6 +15,7 @@

{createdb}
DB root username:
DB root password:
+ DB grant host:

@@ -40,7 +41,7 @@   +    @@ -54,7 +55,7 @@   +    @@ -79,7 +80,7 @@   +    @@ -152,7 +153,7 @@   +    @@ -180,7 +181,7 @@ -->   +    @@ -201,7 +202,7 @@   +    @@ -219,7 +220,7 @@   +    @@ -235,7 +236,7 @@   +