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

Get incorrect signature when sending "\n" Break line symbol #3

Closed
david50407 opened this issue Apr 6, 2013 · 4 comments
Closed

Get incorrect signature when sending "\n" Break line symbol #3

david50407 opened this issue Apr 6, 2013 · 4 comments
Assignees
Labels

Comments

@david50407
Copy link

As title.
the singature logged by rsPlurkLib is oauth_signature="QweaEMiDvvcw1wSSexpYayARAxQ%3D"
BUT in plurk APP console is G49QO89xDyLMOCzxrXF1swuwNZk%3D, it's different one

@ghost ghost assigned rschiang Apr 6, 2013
@rschiang
Copy link
Owner

rschiang commented Apr 6, 2013

Thanks David! 😆

@rschiang
Copy link
Owner

rschiang commented Apr 6, 2013

The recommended solution has serious bug:

            foreach (char c in source)
                if (cUnreservedChars.IndexOf(c) >= 0)
                    sb.Append(c);
                else
                    sb.Append('%').Append(Convert.ToString((int)c, 16).ToUpperInvariant());

The code will break since Unicode characters need to convert to two or three ASCII character bytes, so signature will fail.

@rschiang rschiang reopened this Apr 6, 2013
rschiang added a commit that referenced this issue Apr 7, 2013
@rschiang
Copy link
Owner

rschiang commented Apr 7, 2013

Commit 9061d61 fixed this problem. Will implement unit test for further library enchancements.

@rschiang rschiang closed this as completed Apr 7, 2013
@rschiang
Copy link
Owner

rschiang commented Apr 7, 2013

\n issue still not solved.

@rschiang rschiang reopened this Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants