Special case for clear passwords, do not touch them!

see #192
This commit is contained in:
Antoine Nguyen
2011-12-28 15:39:52 +01:00
parent babea7e61d
commit 361cf04106
+2
View File
@@ -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)))