Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39203

Connection to Dropbox repositories is not working anymore

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.9, 2.3.3, 2.4.3
    • Fix Version/s: 2.2.10, 2.3.7, 2.4.4
    • Component/s: Repositories
    • Labels:
    • Testing Instructions:
      Hide

      I'd like this to be tested more than just in the QA.

      1. Go to your private files
      2. Browse your Dropbox repository
      3. Use the Login button to log in if not already logged in
      4. Click the logout button
        • Confirm you've been logged out and you see the login button again
      5. Log back in
      6. Confirm you can browse your folders and sub folders
      7. Confirm you can pick a file as a hard copy
      8. Confirm you can pick a file as a reference
      9. Confirm that both are saved in your Private files and have the correct content
      Show
      I'd like this to be tested more than just in the QA. Go to your private files Browse your Dropbox repository Use the Login button to log in if not already logged in Click the logout button Confirm you've been logged out and you see the login button again Log back in Confirm you can browse your folders and sub folders Confirm you can pick a file as a hard copy Confirm you can pick a file as a reference Confirm that both are saved in your Private files and have the correct content
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39203-master

      Description

      I've just noticed that we're not able to connect to Dropbox repositories in our environment. You still get to see the autorisation page from Dropbox but when you click to autorise, the file picker is refreshed but still display the login button. By the way, you won't see the bug if you're already connected to Dropbox in your Moodle account. You have to deconnect yourself and try to reconnect.

      Here's what I have in php errors log :

      [17-Apr-2013 09:41:05] PHP Notice:  Undefined index: oauth_token in /.../moodle/lib/oauthlib.php on line 269
      [17-Apr-2013 09:41:05] PHP Notice:  Undefined index: oauth_token_secret in /.../moodle/lib/oauthlib.php on line 269
      [17-Apr-2013 09:41:05] PHP Notice:  Undefined index: oauth_token in /.../moodle/repository/dropbox/lib.php on line 157
      [17-Apr-2013 09:41:05] PHP Notice:  Undefined index: oauth_token_secret in /.../moodle/repository/dropbox/lib.php on line 158
      

      It seems obviously that Moodle is unable to recover the token from Dropbox... Maybe something has changed in the Dropbox API ?

      I've reproduced this bug in 2.3.3 and 2.4.3 only. Can someone confirm if the problem is or is not there in master branch ?

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            marycooch Mary Cooch added a comment -

            I just tried this on a new 2.5 install and I got the same behaviour.

            Show
            marycooch Mary Cooch added a comment - I just tried this on a new 2.5 install and I got the same behaviour.
            Hide
            gaudreaj Jean-Philippe Gaudreau added a comment -

            Thx Mary

            Show
            gaudreaj Jean-Philippe Gaudreau added a comment - Thx Mary
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            I can confirm this is a bug in latest 2.5 beta install and is also effecting moodle.org

            Show
            ankit_frenz Ankit Agarwal added a comment - I can confirm this is a bug in latest 2.5 beta install and is also effecting moodle.org
            Hide
            salvetore Michael de Raadt added a comment -

            It looks like Fred's already onto it. Go Fred!

            Show
            salvetore Michael de Raadt added a comment - It looks like Fred's already onto it. Go Fred!
            Hide
            fred Frédéric Massart added a comment -

            Sending for peer review.

            1. We were using http://www.dropbox.com/... instead of api.dropbox.com.
            2. Which lead to discovering another problem, we were passing the parameter oauth_callback whereas we shouldn't: http://oauth.net/core/1.0/#rfc.section.A.4

            This bug is likely to be caused by an improvement of the security at Dropbox. I would suggest to backport it to 2.2.

            The modification of the class oauth_helper should not have any incidence on other core modules as only Dropbox is using it.

            Show
            fred Frédéric Massart added a comment - Sending for peer review. We were using http://www.dropbox.com/ ... instead of api.dropbox.com. Which lead to discovering another problem, we were passing the parameter oauth_callback whereas we shouldn't: http://oauth.net/core/1.0/#rfc.section.A.4 This bug is likely to be caused by an improvement of the security at Dropbox. I would suggest to backport it to 2.2. The modification of the class oauth_helper should not have any incidence on other core modules as only Dropbox is using it.
            Hide
            poltawski Dan Poltawski added a comment -

            Pulling this straight into integration as the quicker we fix this the better

            Show
            poltawski Dan Poltawski added a comment - Pulling this straight into integration as the quicker we fix this the better
            Hide
            poltawski Dan Poltawski added a comment -

            To be clear, the oauth_callback shouldn't be in the access token request, but in the request_token.

            Show
            poltawski Dan Poltawski added a comment - To be clear, the oauth_callback shouldn't be in the access token request, but in the request_token.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master, 24, 23 and 22. Thanks a lot Fred!

            Show
            poltawski Dan Poltawski added a comment - Integrated to master, 24, 23 and 22. Thanks a lot Fred!
            Hide
            poltawski Dan Poltawski added a comment -

            Tested during integration and it looks good.

            Show
            poltawski Dan Poltawski added a comment - Tested during integration and it looks good.
            Hide
            poltawski Dan Poltawski added a comment -

            (Obviously I didn't test references on 2.2 :-P )

            Show
            poltawski Dan Poltawski added a comment - (Obviously I didn't test references on 2.2 :-P )
            Hide
            poltawski Dan Poltawski added a comment -

            Blooming Marvelous! It's time for a knees up - your changes are upstream!

            Thanks for making Moodle better!

            Toodle pip

            Show
            poltawski Dan Poltawski added a comment - Blooming Marvelous! It's time for a knees up - your changes are upstream! Thanks for making Moodle better! Toodle pip
            Hide
            gaudreaj Jean-Philippe Gaudreau added a comment -

            Wow that was fast! Thx Fred

            Show
            gaudreaj Jean-Philippe Gaudreau added a comment - Wow that was fast! Thx Fred

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13