Parse the client secret properly

This commit is contained in:
Joseph Schorr 2015-05-18 15:01:37 -04:00
parent fb8e718c44
commit 2379af71f8
2 changed files with 11 additions and 5 deletions

View file

@ -11,6 +11,10 @@ def parse_basic_auth(header_value):
return None
try:
return base64.b64decode(parts[1])
basic_parts = base64.b64decode(parts[1]).split(':')
if len(basic_parts) != 2:
return None
return basic_parts
except ValueError:
return None