icinga-sso-web module version: 1.0.0
provider: Jumpcloud
Error message
Icinga\User::setGroups(): Argument #1 ($groups) must be of type array, string given, called in /usr/share/icingaweb2/modules/sso/application/controllers/OidcController.php on line 113
Expected result: No error message
Tested solution: Added is_string check and convert to array in sso/application/controllers/OidcController.php:95 before group parsing. After adding this SSO works as expected without error.
if (is_string($groups)) {
$groups = array_filter(array_map('trim', explode(',', $groups)));
}
if ($groups !== null) {
$groupnameSearch = $login->config->groupname_search ?? '';
if ($groupnameSearch !== '') {
$groups = array_map(function ($group) use ($groupnameSearch, $login): string {
return preg_replace($groupnameSearch, $login->config->groupname_replace ?? '', $group);
}, $groups);
}
}
icinga-sso-web module version: 1.0.0
provider: Jumpcloud
Error message
Expected result: No error message
Tested solution: Added
is_stringcheck and convert to array insso/application/controllers/OidcController.php:95before group parsing. After adding this SSO works as expected without error.