Closed
Description
Describe the Bug
Null default value causes exception in App/Access
/LdapService.php on login.
If this is done with anonymous bind and cn is not accessible, argument 3 (userCn) for getUserDisplayName is null, which is not allowed.
$userCn = $this->getUserResponseProperty($user, 'cn', null);
$formatted = [
'uid' => $this->getUserResponseProperty($user, $idAttr, $user['dn']),
'name' => $this->getUserDisplayName($user, $displayNameAttrs, $userCn),
'dn' => $user['dn'],
'email' => $this->getUserResponseProperty($user, $emailAttr, null),
'avatar' => $thumbnailAttr ? $this->getUserResponseProperty($user, $thumbnailAttr, null) : null,
];
This change came with Version 24.12, before that login with this config worked fine.
Not a breaking change, but thught you should know :)
Best regards and thanks for your work!
Steps to Reproduce
- LDAP-Config without LDAP_DN/LDAP_PASS
- LDAP where cn is not readable with anonymous
- Try to Login
Expected Behaviour
Login
Screenshots or Additional Context
No response
Browser Details
No response
Exact BookStack Version
24.12.1