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

Fix parsing OAuth1.0a responses for Twitter #1821

Merged
merged 1 commit into from Nov 15, 2021

Conversation

sjerdo
Copy link
Contributor

@sjerdo sjerdo commented Nov 13, 2021

Fixes #1820

Parses text/html;charset=utf-8 response as string instead of json. This is necessary for OAuth1.0a responses from Twitter.

@sjerdo sjerdo force-pushed the bugfix/twitter-oauth-response-parsing branch from 98fe4c4 to cfed611 Compare November 13, 2021 16:53
@stloyd
Copy link
Collaborator

stloyd commented Nov 13, 2021

As you mentioned it's specific for Twitter and seems to not be used by other providers, thus I'm not sure this should be implemented as global... yet the global fallback was there before...

Let me think a bit about this.

@sjerdo
Copy link
Contributor Author

sjerdo commented Nov 14, 2021

Just checked the OAuth 1.0 implementation for Bitbucket:

Content-type: application/x-www-form-urlencoded

Response content should also be parsed with parse_str

@stloyd
Copy link
Collaborator

stloyd commented Nov 14, 2021

Sounds good, can you adjust Bitbucket & squash commits? Thanks 🙏

Parses text/html;charset=utf-8 response as string instead of json. This is necessary for OAuth1.0a responses from Twitter.
@sjerdo sjerdo force-pushed the bugfix/twitter-oauth-response-parsing branch from 233e500 to f2c9290 Compare November 15, 2021 18:19
@stloyd stloyd merged commit b22ba16 into hwi:master Nov 15, 2021
@stloyd
Copy link
Collaborator

stloyd commented Nov 15, 2021

Thanks @sjerdo !

@sjerdo sjerdo deleted the bugfix/twitter-oauth-response-parsing branch November 15, 2021 19:02
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.

[2.x] Twitter OAuth 1.0 API response content parsing fails
2 participants