Skip to content
Snippets Groups Projects
Verified Commit 79c7f3af authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #8489 encrypt/decrypt password

parent bd6f7edd
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ class ConfigurationController ...@@ -32,7 +32,7 @@ class ConfigurationController
$configuration = ConfigurationModel::getByService(['service' => $aArgs['service']]); $configuration = ConfigurationModel::getByService(['service' => $aArgs['service']]);
$configuration['value'] = (array)json_decode($configuration['value']); $configuration['value'] = (array)json_decode($configuration['value']);
if (isset($configuration['value']['password'])) { if (isset($configuration['value']['password'])) {
unset($configuration['value']['password']); $configuration['value']['password'] = '';
$configuration['value']['passwordAlreadyExists'] = true; $configuration['value']['passwordAlreadyExists'] = true;
} else { } else {
$configuration['value']['passwordAlreadyExists'] = false; $configuration['value']['passwordAlreadyExists'] = false;
......
...@@ -55,6 +55,7 @@ class ConfigurationControllerTest extends TestCase ...@@ -55,6 +55,7 @@ class ConfigurationControllerTest extends TestCase
'port' => '45', 'port' => '45',
'auth' => true, 'auth' => true,
'user' => 'user@test.com', 'user' => 'user@test.com',
'password' => '',
'secure' => 'ssl', 'secure' => 'ssl',
'from' => 'info@maarch.org', 'from' => 'info@maarch.org',
'charset' => 'utf-8', 'charset' => 'utf-8',
...@@ -103,6 +104,7 @@ class ConfigurationControllerTest extends TestCase ...@@ -103,6 +104,7 @@ class ConfigurationControllerTest extends TestCase
'port' => '231', 'port' => '231',
'auth' => false, 'auth' => false,
'user' => '', 'user' => '',
'password' => '',
'secure' => 'tls', 'secure' => 'tls',
'from' => 'info@maarch.org', 'from' => 'info@maarch.org',
'charset' => 'utf-8', 'charset' => 'utf-8',
...@@ -239,6 +241,7 @@ class ConfigurationControllerTest extends TestCase ...@@ -239,6 +241,7 @@ class ConfigurationControllerTest extends TestCase
'port' => '465', 'port' => '465',
'auth' => true, 'auth' => true,
'user' => 'name@maarch.org', 'user' => 'name@maarch.org',
'password' => '',
'secure' => 'ssl', 'secure' => 'ssl',
'from' => 'notifications@maarch.org', 'from' => 'notifications@maarch.org',
'charset' => 'utf-8', 'charset' => 'utf-8',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment