10BC0 don't assume you can split correctly · ptarjan/python-oauth@b0cc716 · GitHub
[go: up one dir, main page]

Skip to content

Commit b0cc716

Browse files
committed
don't assume you can split correctly
1 parent 24c2ba6 commit b0cc716

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

oauth/oauth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ def get_normalized_parameters(self):
241241
pass
242242
param_str = urlparse.urlparse(self.http_url)[4] # query
243243
for p in param_str.split("&"):
244-
k,v = p.split("=", 1)
245-
params[k] = v
244+
s = p.split("=", 1)
245+
if len(s) == 2 :
246+
k,v = s
247+
params[k] = v
246248

247249
# Escape key values before sorting.
248250
key_values = [(escape(_utf8_str(k)), escape(_utf8_str(v))) \

0 commit comments

Comments
 (0)
0