mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
try catch is magic
This commit is contained in:
parent
9929d21fdc
commit
eb9ecb6451
2 changed files with 5 additions and 5 deletions
|
@ -259,10 +259,7 @@ class BaseActionsMapParser(object):
|
||||||
raise MoulinetteError("error_see_log")
|
raise MoulinetteError("error_see_log")
|
||||||
|
|
||||||
# -- 'authenticator'
|
# -- 'authenticator'
|
||||||
if "authenticator" in configuration:
|
auth = configuration.get("authenticator", "default")
|
||||||
auth = configuration["authenticator"]
|
|
||||||
else:
|
|
||||||
auth = "default"
|
|
||||||
if not is_global and isinstance(auth, str):
|
if not is_global and isinstance(auth, str):
|
||||||
# Store needed authenticator profile
|
# Store needed authenticator profile
|
||||||
if auth not in self.global_conf["authenticator"]:
|
if auth not in self.global_conf["authenticator"]:
|
||||||
|
|
|
@ -407,7 +407,10 @@ class _ActionsMapPlugin(object):
|
||||||
# We check that there's a (signed) session.hash available
|
# We check that there's a (signed) session.hash available
|
||||||
# for additional security ?
|
# for additional security ?
|
||||||
# (An attacker could not craft such signed hashed ? (FIXME : need to make sure of this))
|
# (An attacker could not craft such signed hashed ? (FIXME : need to make sure of this))
|
||||||
|
try:
|
||||||
s_secret = self.secrets[s_id]
|
s_secret = self.secrets[s_id]
|
||||||
|
except KeyError:
|
||||||
|
s_secret = {}
|
||||||
if profile not in request.get_cookie(
|
if profile not in request.get_cookie(
|
||||||
"session.tokens", secret=s_secret, default={}
|
"session.tokens", secret=s_secret, default={}
|
||||||
):
|
):
|
||||||
|
|
Loading…
Add table
Reference in a new issue