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

Change how the signature base string is encoded per OAuth standards #2

Closed
wants to merge 1 commit into from

Conversation

CleanShavenApps
Copy link

Previous method of encoding (adapted from AFHTTPClient's AFPercentEscapedQueryStringPairMemberFromStringWithEncoding) is not suitable for constructing a consistent base string to generate the signature from.

In particular, passwords with special symbols such as asterisks, and I believe square brackets and tilde will fail the signature match.

The final OAuth spec on percent encoding (http://tools.ietf.org/html/rfc5849#section-3.6) specifies that all unreserved character must not be encoded (per RFC 3986), while all other symbols must be encoded (which differs from RFC 3986).

In my tests following RFC 3986 by not encoding the unreserved characters seems to work fine.

…s (eg. asterisks) in services such as Instapaper fails by changing the way the signature base string is encoded.
@ghost ghost assigned romaonthego Mar 1, 2013
romaonthego added a commit that referenced this pull request Mar 1, 2013
Change how the signature base string is encoded per OAuth standards
@romaonthego romaonthego merged commit 5e12367 into romaonthego:master Mar 1, 2013
@romaonthego romaonthego closed this Mar 1, 2013
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.

None yet

3 participants