1
0
Fork 0
forked from s3lph/matemat

Merge branch 'hotfix-session-timeout' into 'master'

Fix: Session timeout lead to 500 error

See merge request s3lph/matemat!70
This commit is contained in:
s3lph 2020-02-04 23:36:47 +00:00
commit 123050aec8
5 changed files with 19 additions and 5 deletions

View file

@ -1,7 +1,20 @@
# Matemat Changelog
<!-- BEGIN RELEASE v0.2.3 -->
## Version 0.2.3
Bugfix fix release
### Changes
<!-- BEGIN CHANGES 0.2.3 -->
- Fix: Session timeout lead to 500 error
<!-- END CHANGES 0.2.3 -->
<!-- END RELEASE v0.2.3 -->
<!-- BEGIN RELEASE v0.2.2 -->
## Version 0.2.1
## Version 0.2.2
Security fix release

View file

@ -1,2 +1,2 @@
__version__ = '0.2.2'
__version__ = '0.2.3'

View file

@ -33,7 +33,8 @@ def start() -> str:
# Check for session timeout
if session_id in __session_vars and __session_vars[session_id][0] < now:
end(session_id)
raise TimeoutError('Session timed out.')
# Create new session ID after terminating the previous session
session_id = str(uuid4())
# Update or initialize the session timeout
if session_id not in __session_vars:
__session_vars[session_id] = (now + timedelta(seconds=_SESSION_TIMEOUT)), dict()

View file

@ -2,7 +2,7 @@
# Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
pkgname=matemat
pkgver=0.2.2
pkgver=0.2.3
pkgrel=1
arch=('any')

View file

@ -1,5 +1,5 @@
Package: matemat
Version: 0.2.2
Version: 0.2.3
Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
Section: web
Priority: optional