Skip to content

Check if email is required before fetching from LDAP to prevent key error #6824

@ByteSquire

Description

@ByteSquire

I am getting following error:

in __getitem__
    return self._store[self._case_insensitive_keymap[self._ci_key(key)]]
KeyError: 'mail'

because this doesn't check if mail is required for login

if self._config.LDAP_MAIL_ATTRIBUTE:

I suggest following change:

if self._config.EMAIL_REQUIRED and self._config.LDAP_MAIL_ATTRIBUTE:

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogissue will be fixed in the future... but when... nobody knowsconfigdocumentationmissing or deprecated documentationfunctional debtFunctional bugs. Issues of which we are aware at the time of delivery.needs discussionneed a technic or strategic talk with someone elseuxIssue related to the user experience

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions