? Success

User tests: Successful: Unsuccessful:

avatar AteDev
AteDev
3 Jun 2015

In Oauth2 Client, there is an incorrect check when we want to get access token back from http post.
Some time (maybe all time) there is charset added in the content-type contained in reponse header.

How to test

You can download and install this component here
You need to edit this file: controller to add your client ID/Secret from your linkedin app
If you dont use localhost remove/comment this line

  • Go to yourdomain/index.php/test
  • Click "Sign in with Linkedin", apply app, you will see the return token from linkedin (incorrect array)
  • Apply patch, repeat steps and you will see perfect array.

PS

I tested whith the Linkedin api, this add in content-type "application/json;charset:utf8"

avatar AteDev AteDev - open - 3 Jun 2015
avatar zero-24 zero-24 - change - 3 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Jun 2015
Category Libraries
avatar zero-24 zero-24 - change - 3 Jun 2015
Status New Pending
avatar zero-24
zero-24 - comment - 3 Jun 2015

@AteDev Thanks for your PR. Just to make travis happy see here: AteDev#1

Will add a custom component to help try it out later...

If you have one ready please make a comment so all gets notified that you have on. As only on changing the comment we don't get a notification. Thanks :smiley:


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7110.

avatar AteDev
AteDev - comment - 22 Jul 2015

Added component to help test (finally got time ...), sorry for this hard test :)

avatar conconnl
conconnl - comment - 26 Jun 2016

@AteDev I tried to test this but your test scenario is not working.
The error I get is that the redirect URI is incorrect, whatever I config and test can't seem to get through the first part to generate the incorrect array error.

Please describe a complete test scenario


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7110.

avatar izharaazmi izharaazmi - test_item - 29 Jun 2016 - Tested successfully
avatar izharaazmi
izharaazmi - comment - 29 Jun 2016

I have tested this item successfully on e98f8df

Omg! Too much work to test this :P

I received the following response without this patch:

Array
(
    [{"access_token":"XXXXXX","expires_in":5183484}] => 
    [created] => 1467196746
)

After the patch:

Array
(
    [access_token] => XXXXXX
    [expires_in] => 5182960
    [created] => 1467197270
)

The response header content type is indeed application/json;charset:utf8


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7110.

avatar izharaazmi
izharaazmi - comment - 29 Jun 2016

@conconnl You need to add this http://localhost/~izhar/staging/index.php?option=com_test&task=test.network url to the Authorized Redirect URLs at LinkedIn dev console.

Change the host and joomla path appropriately.

avatar conconnl
conconnl - comment - 29 Jun 2016

Found the problem, sef is by default enabled.
Them you will get other URLs when I disabled it i could start the test with the test component.

Before patch i got:
array(2) { ["{"access_token":"AQWokNE7VFc746UHNuQzg_Ygbc8BsEFEG66Lrj5KPWGM_ievtdZRbCwajlWVbNZH8GFcZ0NvRE-JgzlZ-4GI3rQa4Gd0UtLdRKr2wIMHOM-MhTRGZWtP2AwaglkbT241fAxMYKk8NHh5QLKhRcjdY6yiN0S2GVUvVajIfUfamF1Gn38nlf0","expires_in":5183731}"]=> string(0) "" ["created"]=> int(1467239441) }

After patch i got:
array(3) { ["access_token"]=> string(179) "AQXSUJxZwgRZi1jkG7lD3wEL02p9FFPbgNat03pW5mADVht9VV75bzF4EJQd2ma9LyXAnJXYv8X_RVXKC5b4xEYVbW5hyOGglypddf173umlmtQZamLH6_GVjH4KEZscwa6O69ifqXAtU5Yg7J4u3NJ8C2RGZgg4c7s5DPSfoKSMTll3DZs" ["expires_in"]=> int(5183863) ["created"]=> int(1467239309) }

Is this correct?

avatar izharaazmi
izharaazmi - comment - 29 Jun 2016

Yes that's right. You should mark test as success.

avatar conconnl conconnl - test_item - 29 Jun 2016 - Tested successfully
avatar conconnl
conconnl - comment - 29 Jun 2016

I have tested this item successfully on e98f8df


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7110.

avatar zero-24 zero-24 - change - 30 Jun 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 30 Jun 2016

RTC. Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7110.

avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 11 Jul 2016
Milestone Added:
avatar roland-d roland-d - close - 16 Jul 2016
avatar roland-d roland-d - merge - 16 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - close - 16 Jul 2016
avatar roland-d roland-d - change - 16 Jul 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-16 05:18:02
Closed_By roland-d
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jul 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment