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")
|
||||
|
||||
# -- 'authenticator'
|
||||
if "authenticator" in configuration:
|
||||
auth = configuration["authenticator"]
|
||||
else:
|
||||
auth = "default"
|
||||
auth = configuration.get("authenticator", "default")
|
||||
if not is_global and isinstance(auth, str):
|
||||
# Store needed authenticator profile
|
||||
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
|
||||
# for additional security ?
|
||||
# (An attacker could not craft such signed hashed ? (FIXME : need to make sure of this))
|
||||
s_secret = self.secrets[s_id]
|
||||
try:
|
||||
s_secret = self.secrets[s_id]
|
||||
except KeyError:
|
||||
s_secret = {}
|
||||
if profile not in request.get_cookie(
|
||||
"session.tokens", secret=s_secret, default={}
|
||||
):
|
||||
|
|
Loading…
Add table
Reference in a new issue