diff --git a/perguntations/__init__.py b/perguntations/__init__.py index da43e6f..23c30d3 100644 --- a/perguntations/__init__.py +++ b/perguntations/__init__.py @@ -32,10 +32,10 @@ proof of submission and for review. ''' APP_NAME = 'perguntations' -APP_VERSION = '2022.04.dev1' +APP_VERSION = '2024.06.dev1' APP_DESCRIPTION = str(__doc__) __author__ = 'Miguel Barão' -__copyright__ = 'Copyright 2022, Miguel Barão' +__copyright__ = 'Copyright 2024, Miguel Barão' __license__ = 'MIT license' __version__ = APP_VERSION diff --git a/perguntations/serve.py b/perguntations/serve.py index 2d30d2c..89ab390 100644 --- a/perguntations/serve.py +++ b/perguntations/serve.py @@ -21,9 +21,7 @@ from typing import Dict, Tuple import uuid # user installed libraries -import tornado.ioloop -import tornado.web -import tornado.httpserver +import tornado # this project from .parser_markdown import md_to_html @@ -103,7 +101,7 @@ class BaseHandler(tornado.web.RequestHandler): Since HTTP is stateless, a cookie is used to identify the user. This function returns the cookie for the current user. ''' - cookie = self.get_secure_cookie('perguntations_user') + cookie = self.get_signed_cookie('perguntations_user') if cookie: return cookie.decode('utf-8') return None @@ -140,7 +138,7 @@ class LoginHandler(BaseHandler): await asyncio.sleep(3) # delay to avoid spamming the server... self.render('login.html', error=self._error_msg[error]) else: - self.set_secure_cookie('perguntations_user', str(uid)) + self.set_signed_cookie('perguntations_user', str(uid)) self.redirect('/') diff --git a/setup.py b/setup.py index f22f1f9..266b9d1 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( 'pygments', 'schema>=0.7.5', 'sqlalchemy>=1.4', - 'tornado>=6.1', + 'tornado>=6.3', ], entry_points={ 'console_scripts': [ -- libgit2 0.21.2