From 9f062dabf168b9fa863e6683a69650bfdb9a3534 Mon Sep 17 00:00:00 2001
From: Quentin RIBAC <quentin.ribac@xelians.fr>
Date: Tue, 28 Sep 2021 12:08:10 +0200
Subject: [PATCH] FEAT #14839 TIME 0:02 removed password from multigest global
 configuration

---
 .../multigest/controllers/MultigestController.php         | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/app/external/multigest/controllers/MultigestController.php b/src/app/external/multigest/controllers/MultigestController.php
index 4a487e53656..38e1191e930 100644
--- a/src/app/external/multigest/controllers/MultigestController.php
+++ b/src/app/external/multigest/controllers/MultigestController.php
@@ -51,7 +51,6 @@ class MultigestController
         }
 
         $configuration = json_decode($configuration['value'], true);
-        unset($configuration['password']);
 
         return $response->withJson(['configuration' => $configuration]);
     }
@@ -67,15 +66,10 @@ class MultigestController
         if (!Validator::stringType()->notEmpty()->validate($body['uri'])) {
             return $response->withStatus(400)->withJson(['errors' => 'Body uri is empty or not a string']);
         } elseif (!Validator::stringType()->notEmpty()->validate($body['login'])) {
-            return $response->withStatus(400)->withJson(['errors' => 'Body login is empty or not a string']);
-        } elseif (!Validator::stringType()->notEmpty()->validate($body['password'])) { // TODO login with password or certificate ?
-            return $response->withStatus(400)->withJson(['errors' => 'Body password is empty or not a string']);
         }
 
         $value = json_encode([
-            'uri'      => trim($body['uri']),
-            'login'    => trim($body['login']),
-            'password' => PasswordModel::encrypt(['password' => $body['password']])
+            'uri' => trim($body['uri'])
         ]);
 
         $configuration = ConfigurationModel::getByPrivilege(['privilege' => 'admin_multigest']);
-- 
GitLab