projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4554d6e
)
Fix problem causing exception when invalid Authentication header provided
author
xray7224
<jessica@megworld.co.uk>
Mon, 29 Jul 2013 16:48:53 +0000
(17:48 +0100)
committer
xray7224
<jessica@megworld.co.uk>
Mon, 29 Jul 2013 16:48:53 +0000
(17:48 +0100)
mediagoblin/oauth/tools/request.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/oauth/tools/request.py
b/mediagoblin/oauth/tools/request.py
index 6e484bb674d199038d4cf7e3edc8383dbffc5cca..5ce2da77e24b600cb132a1f41e6ca10fa8a8786e 100644
(file)
--- 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('"')