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

Book module has call to "get_file_by_hash" that is missing sha1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Book
    • Labels:

      Description

      mod/book/tool/importhtml/locallib.php
      Line: 57

              if ($file = $fs->get_file_by_hash("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname")) {                       
      

      Will never find the file because it is missing the sha1 function.

      Should be:

              if ($file = $fs->get_file_by_hash(sha1("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname"))) {                       
      

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/13