mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
allow IP4 subnets and % wildcard when creating MariaDB/MySQL users
This commit is contained in:
parent
9b630bedcc
commit
11b9eb0350
@ -301,7 +301,8 @@ switch($GLOBALS['egw_info']['setup']['stage']['db'])
|
|||||||
{
|
{
|
||||||
case 'dbcreate':
|
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']);
|
!preg_match('/^([0-9.a-z_%-]+|([0-9]{1,3}\.){3}[0-9]{1,3}(\/\d+)?)$/i', $_POST['db_grant_host']) ?
|
||||||
|
'localhost' : $_POST['db_grant_host']);
|
||||||
break;
|
break;
|
||||||
case 'drop':
|
case 'drop':
|
||||||
Api\Csrf::validate($_POST['csrf_token'], __FILE__);
|
Api\Csrf::validate($_POST['csrf_token'], __FILE__);
|
||||||
|
Loading…
Reference in New Issue
Block a user