surjit / oauth

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

In C# OAuthBase.cs, UrlEncoded Paremeters (such as a search string containing a space) are improperly double-encoded when generating the signatureBase #138

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

In C# (haven't tested the other versions) Send an OAUTH request including a
url encoded query parameter (such as a search string with it's spaces
converted to "%20"s). The C# code currently double-url-encodes any already
url-encoded query string parameters, resulting in an invalid signature base
(ex: the %20 improperly becomes %2520).

What is the expected output? What do you see instead?

The signature is invalid because of the double-encoded reserved characters.

Please use labels and text to provide additional information.

I've uploaded a new version of OAuthBase.cs with a patch in place. Simply
UrlDecode the normalizedRequestParameters before re-encoding them. This
ensures there is no double-enoding.

The change is on OAuthBase.cs line 274.

- Bryan

Original issue reported on code.google.com by bryan.c...@gmail.com on 17 Dec 2009 at 8:08

Attachments: