1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-02-03 17:50:12 +01:00

Small bugfixes

This commit is contained in:
prieto 2016-08-31 11:09:13 +02:00
commit a08b41dfb6
2 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,7 @@ __confspec__ = "confspec.py"
__author__ = "Lodel2 dev team"
__fullname__ = "Dummy plugin"
__name__ = 'yweber.dummy'
__plugin_type__ = 'extension'
##@brief This methods allow plugin writter to write some checks

View file

@ -44,9 +44,12 @@ def cookie_hash(token):
#@return None or a session token
def load_cookie(request):
token = request.cookies.get(COOKIE_SESSION_ID)
token=token.encode()
if token is None or len(token) == 0:
return None
token=token.encode()
hashtok = request.cookies.get(COOKIE_SESSION_HASH)
if hashtok is None:
raise ClientAuthenticationFailure(