Fix problem causing exception when invalid Authentication header provided

This commit is contained in:
xray7224 2013-07-29 17:48:53 +01:00
parent 4554d6e014
commit cae55705b1

View File

@ -20,8 +20,11 @@ def decode_authorization_header(header):
tokens = {}
for param in authorization.split(","):
key, value = param.split("=")
try:
key, value = param.split("=")
except ValueError:
continue
key = key.lstrip(" ")
value = value.lstrip(" ").lstrip('"')
value = value.rstrip(" ").rstrip('"')