joker-b / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

javascript: OAuth.setParameters fails when 'parameters' parameter is null #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call OAuth.setParameters(message,parameters) with 'parameters' as null
and 'message' as anything
2. Observe failure due to OAuth.getParameterList returning null and this
not being checked for before assuming the return value has a 'length' property

What is the expected output? What do you see instead?
You expect a string output. Instead, the function throws an error.

What version of the product are you using? On what operating system?
oauth.js, revision 564, Mac OS X 10.4.11, Safari 3.1.1, FireFox 2.0.0.14

Please provide any additional information below.
Patch file attached. Note this problem could also occur in
OAuth.getBaseString and OAuth.normalizeParameters, but not in
OAuth.formEncode, which checks for a null return value. The method used in
the patch is the same as in OAuth.formEncode.

Original issue reported on code.google.com by jnthnl...@gmail.com on 29 May 2008 at 5:34

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by leah.culver on 8 Jul 2008 at 4:51

GoogleCodeExporter commented 9 years ago
I fixed this bug in oauth.js revision 591.

Original comment by jmkrist...@gmail.com on 10 Jul 2008 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by jmkrist...@gmail.com on 10 Jul 2008 at 2:16