Fix problem causing exception when invalid Authentication header provided
This commit is contained in:
parent
4554d6e014
commit
cae55705b1
@ -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('"')
|
||||
|
Loading…
x
Reference in New Issue
Block a user