server/sources/native.py
branchstable
changeset 8317 9c59258e7798
parent 8235 c2a91d6639d8
child 8349 fdb796435d7b
child 8379 1a3746ec4d65
equal deleted inserted replaced
8305:2279e02e62be 8317:9c59258e7798
  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: