cdaecke / md_saml

TYPO3 SSO Login with SAML authentication
Other
2 stars 8 forks source link

SamlAuthService::updateUser function no longer working correctly due to data type issue #26

Closed Bruno86 closed 2 months ago

Bruno86 commented 2 months ago

The SamlAuthService::updateUser function no longer works as expected since this change:

if ($localUser[$key] !== $value) {
    $changed = true;
    break;
}

Indeed, $value (which comes from the settings) is a string, but $localUser[$key] may have a different type. For example, $localUser['pid'] is an integer, but in this case $value is a string. We should not use !== but !=, otherwise this code considers that it is always different and that changed is always true.

cdaecke commented 2 months ago

Thanks a lot for pointing that out!