diff --git a/centreon.xml b/centreon.xml index b5fdddd..815061a 100644 --- a/centreon.xml +++ b/centreon.xml @@ -27,9 +27,9 @@ - 1.0.1 + 1.0.2 ~10.0.0 - https://github.com/pluginsGLPI/centreon/releases/download/1.0.1/glpi-centreon-1.0.1.tar.bz2 + https://github.com/pluginsGLPI/centreon/releases/download/1.0.2/glpi-centreon-1.0.2.tar.bz2 diff --git a/hook.php b/hook.php index e687bce..64e20d3 100644 --- a/hook.php +++ b/hook.php @@ -63,10 +63,13 @@ function plugin_centreon_install($version) /**Migration to 1.0.1 */ if ($centreon_password !== null) { /** Check if pwd is already encrypted, if not, it returns empty string */ + /** It's not necessary to encrypt again, because setConfigurationValues() check + * if the value is in secured_configs and if yes, and encrypt it + */ $decrypted_pwd = @(new GLPIKey())->decrypt($centreon_password); if ($decrypted_pwd == '') { Config::setConfigurationValues('plugin:centreon', [ - 'centreon-password' => (new GLPIKey())->encrypt($centreon_password), + 'centreon-password' => $centreon_password, ]); } } diff --git a/setup.php b/setup.php index 2252038..0f0d4fd 100644 --- a/setup.php +++ b/setup.php @@ -28,7 +28,7 @@ * ------------------------------------------------------------------------- */ -define('PLUGIN_CENTREON_VERSION', '1.0.1'); +define('PLUGIN_CENTREON_VERSION', '1.0.2'); // Minimal GLPI version, inclusive define('PLUGIN_CENTREON_MIN_GLPI_VERSION', '10.0.0');