Skip to content

Commit

Permalink
make default claim config check stricter
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Jun 20, 2024
1 parent 1023ea2 commit d5047f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ public function login(int $providerId, string $redirectUrl = null) {

// by default: default claims are ENABLED
// default claims are historically for quota, email, displayName and groups
$isDefaultClaimsEnabled = !isset($oidcSystemConfig['enable_default_claims'])
|| in_array($oidcSystemConfig['enable_default_claims'], [true, 'true', 1, '1'], true);
$isDefaultClaimsEnabled = !isset($oidcSystemConfig['enable_default_claims']) || $oidcSystemConfig['enable_default_claims'] !== false;
if ($isDefaultClaimsEnabled) {
// default claims for quota, email, displayName and groups is ENABLED
$emailAttribute = $this->providerService->getSetting($providerId, ProviderService::SETTING_MAPPING_EMAIL, 'email');
Expand Down

0 comments on commit d5047f1

Please sign in to comment.