equal
deleted
inserted
replaced
239 rset = self.syntax_tree_search(session, self._passwd_rqlst, args) |
239 rset = self.syntax_tree_search(session, self._passwd_rqlst, args) |
240 try: |
240 try: |
241 pwd = rset[0][0] |
241 pwd = rset[0][0] |
242 except IndexError: |
242 except IndexError: |
243 raise AuthenticationError('bad login') |
243 raise AuthenticationError('bad login') |
244 # passwords are stored using the bytea type, so we get a StringIO |
244 # passwords are stored using the Bytes type, so we get a StringIO |
245 if pwd is not None: |
245 if pwd is not None: |
246 args['pwd'] = crypt_password(password, pwd.getvalue()[:2]) |
246 args['pwd'] = crypt_password(password, pwd.getvalue()[:2]) |
247 # get eid from login and (crypted) password |
247 # get eid from login and (crypted) password |
248 rset = self.syntax_tree_search(session, self._auth_rqlst, args) |
248 rset = self.syntax_tree_search(session, self._auth_rqlst, args) |
249 try: |
249 try: |
479 # but rowcount is 0 |
479 # but rowcount is 0 |
480 #if cursor.rowcount > 0: |
480 #if cursor.rowcount > 0: |
481 try: |
481 try: |
482 result = cursor.fetchone() |
482 result = cursor.fetchone() |
483 if result: |
483 if result: |
484 eid = result[0] |
484 return result[0] |
485 return eid |
|
486 except: |
485 except: |
487 pass |
486 pass |
488 return None |
487 return None |
489 |
488 |
490 def temp_table_def(self, selected, sol, table): |
489 def temp_table_def(self, selected, sol, table): |