diff --git a/datamodels/2.x/itop-config/config.php b/datamodels/2.x/itop-config/config.php index c16a9db4f..18c3ff376 100644 --- a/datamodels/2.x/itop-config/config.php +++ b/datamodels/2.x/itop-config/config.php @@ -84,10 +84,10 @@ function CheckDBPasswordInNewConfig($sSafeContent) { $bIsWindows = (array_key_exists('WINDIR', $_SERVER) || array_key_exists('windir', $_SERVER)); - if ($bIsWindows && (preg_match("@'db_pwd' => '[^%']+',@", $sSafeContent) === 0)) + if ($bIsWindows && (preg_match("@'db_pwd' => '[^%!\"']+',@", $sSafeContent) === 0)) { // Unsupported Password - throw new Exception("Database password should not contain % character (backups won't work)..."); + throw new Exception("On Windows, database password must not contain %, ! or \" character (backups won't work)..."); } } diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 0424e1b0a..55ec9b666 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -1307,11 +1307,11 @@ EOF $sDBName = $aParameters['db_name']; $bIsWindows = (array_key_exists('WINDIR', $_SERVER) || array_key_exists('windir', $_SERVER)); - if ($bIsWindows && (strpos($sDBPwd, '%') !== false)) + if ($bIsWindows && (preg_match('@([%!"])@',$sDBPwd) > 0)) { // Unsuported Password, disable the "Next" button $oPage->add_ready_script('$("#wiz_form").data("db_connection", "error");'); - $oPage->add_ready_script('$("#db_info").html(" Database password cannot contain % character...");'); + $oPage->add_ready_script('$("#db_info").html(" On Windows, database password must not contain %, ! or " character");'); } else {