summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@0d.be>2009-10-07 20:03:41 (GMT)
committerFrédéric Péters <fpeters@0d.be>2009-10-07 20:03:41 (GMT)
commit6390a3f71ce8c17c0bf15e88b1b26e353cdc796d (patch)
treed695ae370b8d2e36869c76943c34819cbfe8005b
parentdab79962afaa5b5e71ce2dc86e9067e740602dc9 (diff)
downloadpratic-6390a3f71ce8c17c0bf15e88b1b26e353cdc796d.zip
pratic-6390a3f71ce8c17c0bf15e88b1b26e353cdc796d.tar.gz
pratic-6390a3f71ce8c17c0bf15e88b1b26e353cdc796d.tar.bz2
Don't fail on invalid DN syntax caused by improper username
-rw-r--r--idp/extra/modules/store.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/idp/extra/modules/store.py b/idp/extra/modules/store.py
index 5dcebc6..c0d271b 100644
--- a/idp/extra/modules/store.py
+++ b/idp/extra/modules/store.py
@@ -49,6 +49,8 @@ class IdentitiesStorePratic:
uid = 'uid=%s,%s' % (username, collectivity)
try:
ldap_conn.simple_bind_s(uid, password)
+ except ldap.INVALID_DN_SYNTAX:
+ return None
except ldap.INVALID_CREDENTIALS:
return None