mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Fix 'Missing credentials parameter' bug : request.POST is buggy when value contains special chars ... request.params appears to be more reliable
This commit is contained in:
parent
fc4b31bdea
commit
c5f577c04f
1 changed files with 3 additions and 6 deletions
|
@ -393,14 +393,11 @@ class _ActionsMapPlugin(object):
|
|||
|
||||
"""
|
||||
|
||||
credentials = request.POST.credentials
|
||||
# Apparently even if the key doesn't exists, request.POST.foobar just returns empty string...
|
||||
if not credentials:
|
||||
if "credentials" not in request.params:
|
||||
raise HTTPResponse("Missing credentials parameter", 400)
|
||||
credentials = request.params["credentials"]
|
||||
|
||||
profile = request.POST.profile
|
||||
if not profile:
|
||||
profile = self.actionsmap.default_authentication
|
||||
profile = request.params.get("profile", self.actionsmap.default_authentication)
|
||||
|
||||
authenticator = self.actionsmap.get_authenticator(profile)
|
||||
|
||||
|
|
Loading…
Reference in a new issue