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

Wrong Dropbox authorization URL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1
    • Fix Version/s: 2.0.3
    • Component/s: Repositories
    • Environment:
      Moodle 2.0.2+ (20110427), Moodle 2.1dev (20110427)
    • Testing Instructions:
      Hide

      To test it:

      Enable dropbox repository plugin at Site administration->plugins->repositories->manage repositories
      Go to user private files area, open file picker, choose dropbox, a login button should appear, click it, you should see dropbox login page instead of dropbox warning page about url changed.

      Show
      To test it: Enable dropbox repository plugin at Site administration->plugins->repositories->manage repositories Go to user private files area, open file picker, choose dropbox, a login button should appear, click it, you should see dropbox login page instead of dropbox warning page about url changed.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
      git@github.com:dongsheng/moodle.git
    • Pull Master Branch:
      s10_MDL-27330_dropbox_authorization_url_master

      Description

      In Moodle 2.0.2 and Moodle 2.1 you will get an error with the Dropbox authorization URL.
      Moodle links to https://api.dropbox.com/0/oauth/
      The url should be https://www.dropbox.com/0/oauth/
      I don't know if Dropbox changed this url during the last time.

      It's a blocker.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              krause Ralf Krause added a comment -
              Show
              krause Ralf Krause added a comment - Also look at http://moodle.org/mod/forum/discuss.php?d=173457
              Hide
              dongsheng Dongsheng Cai added a comment -

              Thanks for reporting.

              Yes, dropbox changed the url, we should fix it next development cycle.

              Show
              dongsheng Dongsheng Cai added a comment - Thanks for reporting. Yes, dropbox changed the url, we should fix it next development cycle.
              Hide
              dongsheng Dongsheng Cai added a comment -

              Hi, Ralf, just to confirm, seems dropbox change url back, https://www.dropbox.com/0/oauth/ gives 404 error now.

              Show
              dongsheng Dongsheng Cai added a comment - Hi, Ralf, just to confirm, seems dropbox change url back, https://www.dropbox.com/0/oauth/ gives 404 error now.
              Hide
              dongsheng Dongsheng Cai added a comment -

              Please ignore my last comment, http://www.dropbox.com/0/oauth is correct

              Show
              dongsheng Dongsheng Cai added a comment - Please ignore my last comment, http://www.dropbox.com/0/oauth is correct
              Hide
              dongsheng Dongsheng Cai added a comment -

              Fixed in my github

              Show
              dongsheng Dongsheng Cai added a comment - Fixed in my github
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Dongsheng, due to the release of 2.0.3 planned within the next day or two this was integrated immediately.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Dongsheng, due to the release of 2.0.3 planned within the next day or two this was integrated immediately. Cheers Sam
              Hide
              dongsheng Dongsheng Cai added a comment -

              Thanks!

              Regards,
              Dongsheng

              Show
              dongsheng Dongsheng Cai added a comment - Thanks! Regards, Dongsheng
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Uhm, I can connect and browse my files perfectly but when I pick one image I end with:

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Uhm, I can connect and browse my files perfectly but when I pick one image I end with:
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment - - edited

              Uhm, I can connect and browse my files perfectly but when I pick one image I end with:

              ERROR: Invalid JSON string
               
              ( ! ) Warning: file_put_contents(eloy_avatar2006_gorila4skype.gif) [function.file-put-contents]: failed to open stream: Permission denied in /repository/dropbox/locallib.php on line 79
              Call Stack
              #TimeMemoryFunctionLocation
              10.0001643696{main}(  )../repository_ajax.php:0
              20.05424360536repository_dropbox->get_file(  )../repository_ajax.php:213
              30.05424360752dropbox->get_file(  )../lib.php:254
              40.64074369200file_put_contents
              (  )../locallib.php:79
               
               
               
              ( ! ) Warning: filesize() [function.filesize]: stat failed for eloy_avatar2006_gorila4skype.gif in /repository/repository_ajax.php on line 220
              Call Stack
              #TimeMemoryFunctionLocation
              10.0001643696{main}(  )../repository_ajax.php:0
              20.64114368248filesize
              (  )../repository_ajax.php:220
               
              {"error":"Can not read file, either file does not exist or there are permission problems","stacktrace":"* line 1048 of \/lib\/filestorage\/file_storage.php: file_exception thrown\n* line 810 of \/lib\/filestorage\/file_storage.php: call to file_storage->add_file_to_pool()\n* line 1003 of \/repository\/lib.php: call to file_storage->create_file_from_pathname()\n* line 243 of \/repository\/repository_ajax.php: call to repository::move_to_filepool()\n","debuginfo":null,"reproductionlink":"http:\/\/127.0.0.1\/~stronk7\/integration\/"}

              I never had tried this before so I don't know I'm missing anything in the Dropbox side in order to get this working.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - - edited Uhm, I can connect and browse my files perfectly but when I pick one image I end with: ERROR: Invalid JSON string   ( ! ) Warning: file_put_contents(eloy_avatar2006_gorila4skype.gif) [function.file-put-contents]: failed to open stream: Permission denied in /repository/dropbox/locallib.php on line 79 Call Stack #TimeMemoryFunctionLocation 10.0001643696{main}( )../repository_ajax.php:0 20.05424360536repository_dropbox->get_file( )../repository_ajax.php:213 30.05424360752dropbox->get_file( )../lib.php:254 40.64074369200file_put_contents ( )../locallib.php:79       ( ! ) Warning: filesize() [function.filesize]: stat failed for eloy_avatar2006_gorila4skype.gif in /repository/repository_ajax.php on line 220 Call Stack #TimeMemoryFunctionLocation 10.0001643696{main}( )../repository_ajax.php:0 20.64114368248filesize ( )../repository_ajax.php:220   {"error":"Can not read file, either file does not exist or there are permission problems","stacktrace":"* line 1048 of \/lib\/filestorage\/file_storage.php: file_exception thrown\n* line 810 of \/lib\/filestorage\/file_storage.php: call to file_storage->add_file_to_pool()\n* line 1003 of \/repository\/lib.php: call to file_storage->create_file_from_pathname()\n* line 243 of \/repository\/repository_ajax.php: call to repository::move_to_filepool()\n","debuginfo":null,"reproductionlink":"http:\/\/127.0.0.1\/~stronk7\/integration\/"} I never had tried this before so I don't know I'm missing anything in the Dropbox side in order to get this working.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              debugging a bit, it seems that the line:

              file_put_contents($saveas, $content);

              is the one casing the 1st warning above, with $saveas being, simply, the name of the file eloy_avatar2006_gorila4skype.gif, without any path at all, so it tries to write the file... into some "incorrect" place.

              I'm sorry but I think this cannot be passed.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - debugging a bit, it seems that the line: file_put_contents($saveas, $content); is the one casing the 1st warning above, with $saveas being, simply, the name of the file eloy_avatar2006_gorila4skype.gif, without any path at all, so it tries to write the file... into some "incorrect" place. I'm sorry but I think this cannot be passed.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              (changing tester to me, as far as i decided to fail this)

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - (changing tester to me, as far as i decided to fail this)
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Just tried it once more with one file without spaces nor underscores (lolo.git) and the same problem persists, tried both locally and @ qa.moodle.net

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Just tried it once more with one file without spaces nor underscores (lolo.git) and the same problem persists, tried both locally and @ qa.moodle.net
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              OKi, finally, I'm passing this as far as the connection happens ok and it's possible to browse the files perfectly.

              I've created MDL-27382 (to be fixed ASAP) as followup for the problems found.

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - OKi, finally, I'm passing this as far as the connection happens ok and it's possible to browse the files perfectly. I've created MDL-27382 (to be fixed ASAP) as followup for the problems found. Ciao
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Closing as fixed. Many thanks!

              Note: Don't forget the followup, plz!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Closing as fixed. Many thanks! Note: Don't forget the followup, plz!

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11