Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Mar 11, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed title: javascript: OAuth.setParameters fails when 'parameters' parameter is null

@GoogleCodeExporter
Copy link
Author

I fixed this bug in oauth.js revision 591.

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant