Mrjndong / socialauth

Automatically exported from code.google.com/p/socialauth
0 stars 0 forks source link

Twitter auth fails when using gzip compression #175

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Configure a twitter auth using the example code on the Wiki
2. Attempt to login via Twitter

What is the expected output? What do you see instead?

You should be redirected to twitter to authorise the app. Instead an error is 
displayed on the twitter api page stating that the oauth key is missing

What version of the product are you using? On what operating system?

socialauth 2.2, Linux (Fedora 16 64bit), JDK 1.7, Jetty 8

Please provide any additional information below.

The problem is caused by Twitter switching to gzipped response streams. The 
token parsing in OAuthConsumer does not check the headers (Content-Encoding) 
before creating a buffered stream reader.

In the event that the Content-Encoding is gzip, the response input stream must 
be wrapped in a GZIPInputStreamReader in order to get the content. 

OAuthConsumer does not make use of Response.getResponseBodyAsString(), 
switching to this would allow the fix in a single location.

I can provide a patch if required.

Original issue reported on code.google.com by dmb...@gmail.com on 26 Apr 2012 at 12:54

GoogleCodeExporter commented 8 years ago
Hi

Thanks for this update.
Its highly appreciated if you provide the patch. After testing we will include 
this in our next release.
You can send this to tarunn@brickred.com.

Regards
Tarun

Original comment by tar...@brickred.com on 27 Apr 2012 at 8:24

GoogleCodeExporter commented 8 years ago
Thanks a lot for the patch and added you as a contributor to the project. We 
have checked in the code for the patch and will be incorporated in the binaries 
for next release.

Warm regards,
SocialAuth team

Original comment by l...@brickred.com on 14 May 2012 at 7:58

GoogleCodeExporter commented 8 years ago

Original comment by l...@brickred.com on 14 May 2012 at 8:07

GoogleCodeExporter commented 8 years ago
Functionality will be available in upcoming release.

Original comment by tar...@brickred.com on 16 May 2012 at 12:32