From 361cf04106c04c23ba72ed8ebef7e4ff636ff9a0 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 28 Dec 2011 15:39:52 +0100 Subject: [PATCH] Special case for clear passwords, do not touch them! see #192 --- lib/ldaputils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ldaputils.py b/lib/ldaputils.py index 3db6841ff..9d9f42143 100644 --- a/lib/ldaputils.py +++ b/lib/ldaputils.py @@ -90,6 +90,8 @@ class LDAPAuthBackend(object): :return: the encrypted password """ scheme = parameters.get_admin("PASSWORD_SCHEME", app="admin") + if scheme == "clear": + return str(clearpassword) crypted = crypt_password(clearpassword, False) return str("{%s}%s" % (scheme.upper(), base64.encodestring(crypted)))