diff options
author | xray7224 <jessica@megworld.co.uk> | 2013-07-29 17:48:53 +0100 |
---|---|---|
committer | xray7224 <jessica@megworld.co.uk> | 2013-07-29 17:48:53 +0100 |
commit | cae55705b154c9c78380678ca340a124220c2774 (patch) | |
tree | 6466807b966c78c13ec22803df8a50239deed90b /mediagoblin/oauth | |
parent | 4554d6e0140fab80a3b6e0d3ac5fc015d769e152 (diff) | |
download | mediagoblin-cae55705b154c9c78380678ca340a124220c2774.tar.lz mediagoblin-cae55705b154c9c78380678ca340a124220c2774.tar.xz mediagoblin-cae55705b154c9c78380678ca340a124220c2774.zip |
Fix problem causing exception when invalid Authentication header provided
Diffstat (limited to 'mediagoblin/oauth')
-rw-r--r-- | mediagoblin/oauth/tools/request.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/oauth/tools/request.py b/mediagoblin/oauth/tools/request.py index 6e484bb6..5ce2da77 100644 --- a/mediagoblin/oauth/tools/request.py +++ b/mediagoblin/oauth/tools/request.py @@ -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('"') |