Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 9fd8daf

Browse files
committed
Replace deprecated usage of Toolbox::decrypt()
1 parent 80b131f commit 9fd8daf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

inc/config.class.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,17 @@ static function install(Migration $migration) {
291291
$config = new self();
292292
$config->getFromDB(1);
293293
if (!empty($config->fields['pwd'])) {
294+
$key = new GLPIKey();
294295
$migration->addPostQuery(
295296
$DB->buildUpdate(
296297
'glpi_plugin_mantis_configs',
297298
[
298-
'pwd' => Toolbox::sodiumEncrypt(Toolbox::decrypt($config->fields['pwd']))
299+
'pwd' => Toolbox::sodiumEncrypt(
300+
$key->decryptUsingLegacyKey(
301+
$config->fields['pwd'],
302+
$key->getLegacyKey()
303+
)
304+
)
299305
],
300306
[
301307
'id' => 1,

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
define("PLUGIN_MANTIS_VERSION", "4.4.0");
2727

2828
// Minimal GLPI version, inclusive
29-
define("PLUGIN_MANTIS_MIN_GLPI", "9.5");
29+
define("PLUGIN_MANTIS_MIN_GLPI", "10.0.0");
3030
// Maximum GLPI version, exclusive
3131
define("PLUGIN_MANTIS_MAX_GLPI", "10.0.99");
3232

0 commit comments

Comments
 (0)