Fallback to other content_type if parsing fails

Bug #1415376 reported by Chris Wayne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
signon-plugin-oauth2 (Ubuntu)
Fix Released
High
Alberto Mardegan

Bug Description

WHen trying to create a weibo account-plugin, an access_token is received, but failed to parse, as it shows up with CONTENT_TYPE of text/plain even though it's json

sendOAuth2PostRequest : Query string = QUrl( "?grant_type=authorization_code&code=10c3826cc5a2bc8f41944e11b4cb4c32&redirect_uri=https://wiki.ubuntu.com/" )
syslog:Jan 28 06:28:01 ubuntu-phablet signonpluginprocess[9658]: ../../../../src/remotepluginprocess/remotepluginprocess.cpp 496 startTask operation is completed
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: base-plugin.cpp 133 onPostFinished : Finished signal received
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: oauth2plugin.cpp 428 serverReply : "{"access_token":"2.00xzUlGB0tpiMK297ffd7bd8xynhbD","remind_in":"131519","expires_in":131519,"uid":"1016111425"}"
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: oauth2plugin.cpp 432 serverReply : QVariant(int, 200)
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: oauth2plugin.cpp 466 serverReply : "text/plain;charset=UTF-8" content received
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: oauth2plugin.cpp 662 parseTextReply :
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: oauth2plugin.cpp 473 serverReply : Access token is empty
syslog:Jan 28 06:28:02 ubuntu-phablet signonpluginprocess[9658]: ../../../../src/remotepluginprocess/remotepluginprocess.cpp 425 disableCancelThread Before the isFinished loop

David Barth (dbarth)
Changed in signon-plugin-oauth2 (Ubuntu):
assignee: nobody → Alberto Mardegan (mardy)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package signon-plugin-oauth2 - 0.21+15.04.20150128-0ubuntu1

---------------
signon-plugin-oauth2 (0.21+15.04.20150128-0ubuntu1) vivid; urgency=medium

  [ Alberto Mardegan ]
  * New upstream release
    - Add ForceTokenRefresh flag for forcing a new token
    - OAuth2: implement a fallback mechanism when parsing replies
      (LP: #1415376)
    - Fixes build with -Werror=unused-variable
    - Improve test coverage
 -- Ubuntu daily release <email address hidden> Wed, 28 Jan 2015 17:16:29 +0000

Changed in signon-plugin-oauth2 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.