mirror of
https://github.com/yweber/lodel2.git
synced 2026-02-03 17:50:12 +01:00
Small bugfixes
This commit is contained in:
parent
66712d9a6a
commit
a08b41dfb6
2 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ __confspec__ = "confspec.py"
|
||||||
__author__ = "Lodel2 dev team"
|
__author__ = "Lodel2 dev team"
|
||||||
__fullname__ = "Dummy plugin"
|
__fullname__ = "Dummy plugin"
|
||||||
__name__ = 'yweber.dummy'
|
__name__ = 'yweber.dummy'
|
||||||
|
__plugin_type__ = 'extension'
|
||||||
|
|
||||||
|
|
||||||
##@brief This methods allow plugin writter to write some checks
|
##@brief This methods allow plugin writter to write some checks
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,12 @@ def cookie_hash(token):
|
||||||
#@return None or a session token
|
#@return None or a session token
|
||||||
def load_cookie(request):
|
def load_cookie(request):
|
||||||
token = request.cookies.get(COOKIE_SESSION_ID)
|
token = request.cookies.get(COOKIE_SESSION_ID)
|
||||||
token=token.encode()
|
|
||||||
if token is None or len(token) == 0:
|
if token is None or len(token) == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
token=token.encode()
|
||||||
|
|
||||||
hashtok = request.cookies.get(COOKIE_SESSION_HASH)
|
hashtok = request.cookies.get(COOKIE_SESSION_HASH)
|
||||||
if hashtok is None:
|
if hashtok is None:
|
||||||
raise ClientAuthenticationFailure(
|
raise ClientAuthenticationFailure(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue