Skip to content
Snippets Groups Projects
Commit 8a0dd298 authored by MANALIMALPANI's avatar MANALIMALPANI
Browse files

[FIX] auth_ldap: fix LDAP error handling


    In order to ensure consistent results of all error conditions returned
    by the LDAP server, the _authenticate() method should return `False`
    for every kind of exception, not just for INVALID_CREDENTIALS.

    This is not actually relevant in 12.0 as the result is exactly the
    same, due to the way the `entry` variable is being initialized, but it
    will make the code path "visibly consistent" across all supported
    versions

closes odoo/odoo#72484

X-original-commit: 24a3f669
Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
parent 8603b89a
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,7 @@ class CompanyLDAP(models.Model):
return False
except ldap.LDAPError as e:
_logger.error('An LDAP exception occurred: %s', e)
return False
return entry
def _query(self, conf, filter, retrieve_attributes=None):
......
Ireland, 2021-06-18
I hereby agree to the terms of the Odoo Individual Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
Manali Malpani manali.malpani@ibm.com https://github.com/manali-malpani
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment