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

FIX #12010 authorize empty value for secure

parent 0155b336
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,6 @@ class ConfigurationController ...@@ -210,7 +210,6 @@ class ConfigurationController
'from' => $body['value']['from'], 'from' => $body['value']['from'],
'charset' => empty($body['value']['charset']) ? 'utf-8' : $body['value']['charset'] 'charset' => empty($body['value']['charset']) ? 'utf-8' : $body['value']['charset']
]); ]);
} elseif ($configuration['identifier'] == 'ldapServer') { } elseif ($configuration['identifier'] == 'ldapServer') {
if (!PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_connections'])) { if (!PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_connections'])) {
return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']);
...@@ -368,8 +367,8 @@ class ConfigurationController ...@@ -368,8 +367,8 @@ class ConfigurationController
return ['errors' => 'Body[\'value\'] port is empty or not an integer']; return ['errors' => 'Body[\'value\'] port is empty or not an integer'];
} elseif (!Validator::boolType()->validate($args['auth'])) { } elseif (!Validator::boolType()->validate($args['auth'])) {
return ['errors' => 'Body[\'value\'] auth is empty or not a boolean']; return ['errors' => 'Body[\'value\'] auth is empty or not a boolean'];
} elseif (!Validator::stringType()->notEmpty()->validate($args['secure'])) { } elseif (!Validator::stringType()->validate($args['secure'])) {
return ['errors' => 'Body[\'value\'] secure is empty or not a string']; return ['errors' => 'Body[\'value\'] secure is not a string'];
} elseif (!Validator::stringType()->notEmpty()->validate($args['from'])) { } elseif (!Validator::stringType()->notEmpty()->validate($args['from'])) {
return ['errors' => 'Body[\'value\'] from is empty or not a string']; return ['errors' => 'Body[\'value\'] from is empty or not a string'];
} }
......
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