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

Fixing issue with wrong signature being generated when multipart data is posted. #412

Merged
merged 2 commits into from
Jun 11, 2013

Conversation

NirgunaSarvajna
Copy link
Contributor

The recent changes released in 4.7.0 broke at least update_with_media API method.

Any multipart request shouldn't have it's POST parameters included while generating the OAuth signature.

The request method on Twitter::Client gets signature_params but
doesn't pass that along to request_setup method breaking the signature
on multipart posts.

This fix adds the missing extra param to request_setup and uses it
when generating the OAuth signature.

…ted when multipart data is posted.

The `request` method on Twitter::Client gets signature_params but
doesn't pass that along to `request_setup` method breaking the signature
on multipart posts.

This fix adds the missing extra param to `request_setup` and uses it
when generating the OAuth signature.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 65ab90a on NirgunaSarvajna:master into 54bdde1 on sferik:master.

@paracycle
Copy link
Collaborator

Hi,

Thanks for finding the root cause of this issue. It seems I have inadvertently introduced this subtle bug while refactoring the request handling methods.

Do you mind adding a test case that makes sure that we don't have any more regressions in this area of the code (vis-a-vis respecting the signature_params properly)?

@NirgunaSarvajna
Copy link
Contributor Author

I'm not terribly familiar with rspec, let me see what I can do.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 1d19b57 on NirgunaSarvajna:master into 54bdde1 on sferik:master.

@stve
Copy link
Collaborator

stve commented Jun 11, 2013

Thanks for adding tests, mind fixing this typo? persent should be present

@sferik
Copy link
Owner

sferik commented Jun 11, 2013

This looks fine. I’ll fix the typo after the merge.

sferik added a commit that referenced this pull request Jun 11, 2013
 Fixing issue with wrong signature being generated when multipart data is posted.
@sferik sferik merged commit c82e023 into sferik:master Jun 11, 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.

5 participants