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

Calculating the signature of foo=1&bar=false removes the value "false" #123

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

camme
Copy link

@camme camme commented Jan 29, 2013

Since JS will equal "" == false, when the signature is calculated in oauth.js, a property with a value of false will get the parameters for the signature without the actual "false", since it was checked agains "". So to fix this we just need to test all properties with === instead of ==.
Otherwise, the signature check will fail if the server end calculates the signature correctly.

camme added 3 commits January 29, 2013 23:23
…ar&lorem=false, was calculated wrong since it compared false to "" (which gives true) so the value false was omitted. This fix just makes sure that the value is compared with === "" to check whether its an empty string. Since JS gives var a = false; a == "" // true, we have to use ===
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant