Fixed request token parsing using cgi.parse_qs method by antonmoiseev · Pull Request #76 · joestump/python-oauth2 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Fixed request token parsing using cgi.parse_qs method #76

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed request token parsing using cgi.parse_qs method #76

wants to merge 1 commit into from

Conversation

antonmoiseev
Copy link

keep_blank_values in OAuthToken.from_string method should be set True, otherwise you will get an unhandled exception trying fetch oauth_token_secret from response if OAuth server doesn't supply this parameter. For example Evernote's OAuth server doesn't provide oauth_token_secret parameter if signature method is PLAINTEXT.

@joestump joestump added this to the 2.0 milestone Jul 29, 2015
@joestump
Copy link
Owner

@antonmoiseev Great catch. Sorry for the obscenely late reply; we just got this repository transferred over and @jaitaiwan and I are trying to go through all the PRs now. Any chance you have a test for this in another fork?

@antonmoiseev
Copy link
Author

I can't believe it 😄. It was probably my first GitHub PR 4 years ago. Unfortunately I don't have any tests and the source code of the original project anymore. However I appreciate your effort to give the project a new life!

@dieselmachine
Copy link

I don't have a test, but I do have a link to the spec that clearly states that empty params are not to be discarded:

http://oauth.net/core/1.0/#anchor14

"Parameters are concatenated in their sorted order into a single string. For each parameter, the name is separated from the corresponding value by an ‘=’ character (ASCII code 61), even if the value is empty. Each name-value pair is separated by an ‘&’ character (ASCII code 38). For example:"

And here is a link to the original issue I reported 5 years ago:

https://code.google.com/p/oauth/issues/detail?id=143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.