diff --git a/migration/20.10/migrateSsoMapping.php b/migration/20.10/migrateSsoMapping.php index 5419ccadfe14b123d17f083201caa37473f7dc46..339b5502c88d9fe9e5e9e908981ab96dcb5acd09 100644 --- a/migration/20.10/migrateSsoMapping.php +++ b/migration/20.10/migrateSsoMapping.php @@ -26,7 +26,7 @@ foreach ($customs as $custom) { $loadedXml = simplexml_load_file($path); if (!empty($loadedXml)) { - $configuration['uri'] = (string)$loadedXml->WEB_SSO_URL; + $configuration['url'] = (string)$loadedXml->WEB_SSO_URL; $configuration['mapping'] = []; diff --git a/src/app/configuration/controllers/ConfigurationController.php b/src/app/configuration/controllers/ConfigurationController.php index 3a5cf5fdb74ff9c68ee9d995a1db6c9b6847bb0d..abb061ee26b41072572f0b2c075cdbf4444b61d9 100755 --- a/src/app/configuration/controllers/ConfigurationController.php +++ b/src/app/configuration/controllers/ConfigurationController.php @@ -102,8 +102,8 @@ class ConfigurationController $data = ['listDisplay' => $data['listDisplay'], 'listEvent' => $data['listEvent']]; } elseif ($args['privilege'] == 'admin_sso') { - if (!Validator::notEmpty()->stringType()->validate($data['uri'])) { - return $response->withStatus(400)->withJson(['errors' => 'Body uri is empty or not a string']); + if (!empty($data['url']) && !Validator::stringType()->validate($data['url'])) { + return $response->withStatus(400)->withJson(['errors' => 'Body url is empty or not a string']); } if (!Validator::notEmpty()->arrayType()->validate($data['mapping'])) { return $response->withStatus(400)->withJson(['errors' => 'Body mapping is empty or not an array']);