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:
commit
123050aec8
5 changed files with 19 additions and 5 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -1,7 +1,20 @@
|
||||||
# Matemat Changelog
|
# 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 -->
|
<!-- BEGIN RELEASE v0.2.2 -->
|
||||||
## Version 0.2.1
|
## Version 0.2.2
|
||||||
|
|
||||||
Security fix release
|
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
|
# Check for session timeout
|
||||||
if session_id in __session_vars and __session_vars[session_id][0] < now:
|
if session_id in __session_vars and __session_vars[session_id][0] < now:
|
||||||
end(session_id)
|
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
|
# Update or initialize the session timeout
|
||||||
if session_id not in __session_vars:
|
if session_id not in __session_vars:
|
||||||
__session_vars[session_id] = (now + timedelta(seconds=_SESSION_TIMEOUT)), dict()
|
__session_vars[session_id] = (now + timedelta(seconds=_SESSION_TIMEOUT)), dict()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
# Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
||||||
|
|
||||||
pkgname=matemat
|
pkgname=matemat
|
||||||
pkgver=0.2.2
|
pkgver=0.2.3
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: matemat
|
Package: matemat
|
||||||
Version: 0.2.2
|
Version: 0.2.3
|
||||||
Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
Maintainer: s3lph <account-gitlab-ideynizv@kernelpanic.lol>
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
|
|
Loading…
Reference in a new issue