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

wants to merge 3 commits into


None yet

1 participant


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 some commits Jan 29, 2013
@camme camme Calculating a signature of property with a value of false, like foo=b…
…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 ===
@camme camme fix json post error ae50df0
@camme camme Make sure that 0 and false are included in the signature 06610b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment