dhagz/oauth

C# Double encode

Opened this issue · 1 comments

What steps will reproduce the problem?
1. Use PLAINTEXT
2. Test with http://term.ie/oauth/example/?sig_method=PLAINTEXT

What is the expected output? 
oauth_signature=secret%2526
What do you see instead?
oauth_signature=secret%26

Solution in the method GenerateSignature

case SignatureTypes.PLAINTEXT:
var firstEncode = HttpUtility.UrlEncode(string.Format("{0}&{1}", 
consumerSecret, tokenSecret));
return HttpUtility.UrlEncode(firstEncode);

Original issue reported on code.google.com by fabiomaulo on 24 Jun 2011 at 4:08

Please forget it!!
It is done when I use HttpUtility.UrlEncode for each parameter instead use the 
returned value directly.
Sorry.

Original comment by fabiomaulo on 24 Jun 2011 at 7:26