Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP #5443

Open
dofeldsc opened this issue Jan 24, 2025 · 0 comments
Open

LDAP #5443

dofeldsc opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@dofeldsc
Copy link

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

  1. LDAP-Config without LDAP_DN/LDAP_PASS
  2. LDAP where cn is not readable with anonymous
  3. Try to Login

Expected Behaviour

Login

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

24.12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant