Skip to content

Commit

Permalink
Added context validation to external function, addressing #7
Browse files Browse the repository at this point in the history
  • Loading branch information
st143971 committed Sep 18, 2023
1 parent 8fe94b8 commit 838430e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public static function get_searched_locations($userid, $courseid, $searchstring,
return '';
}

$coursecontext = context_course::instance($course->id);
self::validate_context($coursecontext);

[$chapters, $misconfiguredchapters] =
block_slidefinder_get_content_as_chapters_for_all_book_pdf_matches_from_course($courseid, $userid);

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
defined('MOODLE_INTERNAL') || die();

$plugin->version = 2023091800; // The current plugin version (Date: YYYYMMDDHH).
$plugin->version = 2023091801; // The current plugin version (Date: YYYYMMDDHH).
$plugin->requires = 2020061510; // Requires this Moodle version.
$plugin->component = 'block_slidefinder'; // Full name of the plugin (used for diagnostics).
$plugin->release = '1.1.1';
Expand Down

0 comments on commit 838430e

Please sign in to comment.