mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] avoid cases where get_cookie returns None
Reference https://bottlepy.org/docs/dev/api.html#bottle.BaseRequest.get_cookie Might now be the most beautiful solution ever but at least it will produce a real error message.
This commit is contained in:
parent
97f8593ba1
commit
1830b229a8
1 changed files with 1 additions and 1 deletions
|
@ -438,7 +438,7 @@ class _ActionsMapPlugin(object):
|
|||
try:
|
||||
s_secret = self.secrets[s_id]
|
||||
s_hash = request.get_cookie('session.hashes',
|
||||
secret=s_secret)[authenticator.name]
|
||||
secret=s_secret, default={})[authenticator.name]
|
||||
except KeyError:
|
||||
if authenticator.name == 'default':
|
||||
msg = m18n.g('authentication_required')
|
||||
|
|
Loading…
Add table
Reference in a new issue