should turn password into a Binary properly stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 22 Dec 2009 18:25:53 +0100
branchstable
changeset 4185 ed99de8f93f2
parent 4180 9fb0d06926cc
child 4193 c3e7d0f85637
should turn password into a Binary properly
server/sources/native.py
--- a/server/sources/native.py	Tue Dec 22 14:18:48 2009 +0100
+++ b/server/sources/native.py	Tue Dec 22 18:25:53 2009 +0100
@@ -289,8 +289,9 @@
                 raise AuthenticationError('bad login')
             # passwords are stored using the Bytes type, so we get a StringIO
             if pwd is not None:
-                args['pwd'] = crypt_password(password, pwd.getvalue()[:2])
+                args['pwd'] = Binary(crypt_password(password, pwd.getvalue()[:2]))
         # get eid from login and (crypted) password
+        # XXX why not simply compare password?
         rset = self.syntax_tree_search(session, self._auth_rqlst, args)
         try:
             return rset[0][0]