Make sure to only split into two parts max

This commit is contained in:
Joseph Schorr 2015-05-20 14:54:41 -04:00
parent 7bed404302
commit ac239ec4ee

View file

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