]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - www/webapp/backend/accounts.py
Website update.
[people/shoehn/ipfire.org.git] / www / webapp / backend / accounts.py
index e3ffd42dfa430f54daaf778ba1b4f0b868253347..54b8f325ada7f8cbda51f7e1ca9392e60a86390d 100644 (file)
@@ -136,10 +136,12 @@ class Account(object):
 
                logging.debug("Checking credentials for %s" % self.dn)
                try:
-                       self.db.simple_bind_s(self.dn, password)
+                       self.db.simple_bind_s(self.dn, password.encode("utf-8"))
                except ldap.INVALID_CREDENTIALS:
+                       logging.debug("Account credentials are invalid.")
                        return False
 
+               logging.debug("Successfully authenticated.")
                return True
 
        @property
@@ -171,6 +173,7 @@ class Account(object):
 
                return gravatar_url
 
+
 if __name__ == "__main__":
        a = Accounts()