equal
deleted
inserted
replaced
1588 raise AuthenticationError('bad login') |
1588 raise AuthenticationError('bad login') |
1589 if pwd is None: |
1589 if pwd is None: |
1590 # if pwd is None but a password is provided, something is wrong |
1590 # if pwd is None but a password is provided, something is wrong |
1591 raise AuthenticationError('bad password') |
1591 raise AuthenticationError('bad password') |
1592 # passwords are stored using the Bytes type, so we get a StringIO |
1592 # passwords are stored using the Bytes type, so we get a StringIO |
1593 args['pwd'] = Binary(crypt_password(password, pwd.getvalue()[:2])) |
1593 args['pwd'] = Binary(crypt_password(password, pwd.getvalue())) |
1594 # get eid from login and (crypted) password |
1594 # get eid from login and (crypted) password |
1595 rset = self.source.syntax_tree_search(session, self._auth_rqlst, args) |
1595 rset = self.source.syntax_tree_search(session, self._auth_rqlst, args) |
1596 try: |
1596 try: |
1597 return rset[0][0] |
1597 return rset[0][0] |
1598 except IndexError: |
1598 except IndexError: |