From b5c259071c0017e85e8cfbe32ee731f2c341cc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 19 Jun 2018 14:10:30 +0200 Subject: [PATCH] sessions: do not access session temporary files for unsaved sessions (#24643) --- wcs/qommon/sessions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcs/qommon/sessions.py b/wcs/qommon/sessions.py index 18856373..b37d838f 100644 --- a/wcs/qommon/sessions.py +++ b/wcs/qommon/sessions.py @@ -281,6 +281,8 @@ class Session(QommonSession, CaptchaSession, StorableObject): def get_tempfile(self, token): if not token: return None + if not self.id: # missing session + return None signer = self.get_signer() try: value = signer.unsign(token) -- 2.17.1