Projet

Général

Profil

0001-ldap-differentiate-errors-during-bind-51353.patch

Valentin Deniaud, 24 février 2021 15:19

Télécharger (1,13 ko)

Voir les différences:

Subject: [PATCH] ldap: differentiate errors during bind (#51353)

 src/authentic2/backends/ldap_backend.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
src/authentic2/backends/ldap_backend.py
1449 1449
            return False, u'invalid credentials'
1450 1450
        except ldap.INVALID_DN_SYNTAX:
1451 1451
            return False, u'invalid dn syntax %s' % who
1452
        except (ldap.TIMEOUT, ldap.CONNECT_ERROR, ldap.SERVER_DOWN):
1453
            return False, u'ldap is down'
1452
        except ldap.CONNECT_ERROR:
1453
            return False, 'connection error'
1454
        except ldap.TIMEOUT:
1455
            False, 'timeout'
1456
        except ldap.SERVER_DOWN:
1457
            False, 'ldap is down'
1454 1458

  
1455 1459
    @classmethod
1456 1460
    def get_connection(cls, block, credentials=()):
1457
-