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

When picking file from EQUELLA repository, an error message says "The source url does not match the sourcekey."

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Setup a EQUELLA repository.
      2. Create a page in a course.
      3. In the editor click to insert an image.
      4. Search and select an image from EQUELLA repository.
      5. You should see no errors and be able to insert an image from the repository.
      Show
      Setup a EQUELLA repository. Create a page in a course. In the editor click to insert an image. Search and select an image from EQUELLA repository. You should see no errors and be able to insert an image from the repository.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-61242-master

      Description

      To replicate the error,

      1. Setup a EQUELLA repository
      2. Create a page in a course
      3. In the tinymce editor, select "Image" button.
      4. Search and select an image from EQUELLA repository.

      A pop-up error box will show "The source url does not match the sourcekey."

      This bug is introduced by the new sourcekey parameter for validating source URL.

      To solve the error, /repository/equella/callback.php need to be updated as follows:

      • After line 71, add

                   $sourcekey=sha1($source.get_secret_key().sesskey());

      • After line 81, add

                   resource.sourcekey = "$sourcekey";

        Attachments

        1. screenshot-0.png
          screenshot-0.png
          30 kB
        2. screenshot-1.png
          screenshot-1.png
          160 kB
        3. screenshot-2.png
          screenshot-2.png
          160 kB
        4. screenshot-3.png
          screenshot-3.png
          114 kB
        5. screenshot-4.png
          screenshot-4.png
          97 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  19/Mar/18