Moodle
  1. Moodle
  2. MDL-39203

Connection to Dropbox repositories is not working anymore

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical 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 2.4 Branch:
    • Pull Master Branch:
      MDL-39203-master
    • Rank:
      49808

      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 ?

        Issue Links

          Activity

          Hide
          Mary Cooch added a comment -

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

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

          Thx Mary

          Show
          Jean-Philippe Gaudreau added a comment - Thx Mary
          Hide
          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 Agarwal added a comment - I can confirm this is a bug in latest 2.5 beta install and is also effecting moodle.org
          Hide
          Michael de Raadt added a comment -

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

          Show
          Michael de Raadt added a comment - It looks like Fred's already onto it. Go Fred!
          Hide
          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
          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
          Dan Poltawski added a comment -

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

          Show
          Dan Poltawski added a comment - Pulling this straight into integration as the quicker we fix this the better
          Hide
          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
          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
          Dan Poltawski added a comment -

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

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

          Tested during integration and it looks good.

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

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

          Show
          Dan Poltawski added a comment - (Obviously I didn't test references on 2.2 :-P )
          Hide
          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
          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
          Jean-Philippe Gaudreau added a comment -

          Wow that was fast! Thx Fred

          Show
          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: