Fix problem causing exception when invalid Authentication header provided
This commit is contained in:
parent
4554d6e014
commit
cae55705b1
@ -20,7 +20,10 @@ def decode_authorization_header(header):
|
|||||||
tokens = {}
|
tokens = {}
|
||||||
|
|
||||||
for param in authorization.split(","):
|
for param in authorization.split(","):
|
||||||
|
try:
|
||||||
key, value = param.split("=")
|
key, value = param.split("=")
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
|
||||||
key = key.lstrip(" ")
|
key = key.lstrip(" ")
|
||||||
value = value.lstrip(" ").lstrip('"')
|
value = value.lstrip(" ").lstrip('"')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user