equal
deleted
inserted
replaced
1624 raise AuthenticationError('bad login') |
1624 raise AuthenticationError('bad login') |
1625 if pwd is None: |
1625 if pwd is None: |
1626 # if pwd is None but a password is provided, something is wrong |
1626 # if pwd is None but a password is provided, something is wrong |
1627 raise AuthenticationError('bad password') |
1627 raise AuthenticationError('bad password') |
1628 # passwords are stored using the Bytes type, so we get a StringIO |
1628 # passwords are stored using the Bytes type, so we get a StringIO |
1629 args['pwd'] = Binary(crypt_password(password, pwd.getvalue()[:2])) |
1629 args['pwd'] = Binary(crypt_password(password, pwd.getvalue())) |
1630 # get eid from login and (crypted) password |
1630 # get eid from login and (crypted) password |
1631 rset = self.source.syntax_tree_search(session, self._auth_rqlst, args) |
1631 rset = self.source.syntax_tree_search(session, self._auth_rqlst, args) |
1632 try: |
1632 try: |
1633 return rset[0][0] |
1633 return rset[0][0] |
1634 except IndexError: |
1634 except IndexError: |