Fix: Session timeout lead to 500 error
This commit is contained in:
parent
dddd9c75be
commit
6026f21a60
5 changed files with 19 additions and 5 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
|
||||
__version__ = '0.2.2'
|
||||
__version__ = '0.2.3'
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue