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

Invalid require_login() params in BBB files helper

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.4.7, 4.5.3
    • BigBlueButton
    • MOODLE_404_STABLE, MOODLE_405_STABLE

      Specifically, this code:
      https://github.com/moodle/moodle/blob/7c97d8549cb49a4e90e1f71df44361a95f8e6f9d/mod/bigbluebuttonbn/classes/local/helpers/files.php#L252

      Which doesn't appear to be hit under test. If it were tested, as in this example test:
      https://github.com/snake/moodle/compare/139a0ad5f04...bbb-requirelogin-bug

      Then you'd see the require_login() exception being thrown:

      core\exception\coding_exception: Coding error detected, it must be fixed by a programmer: cm parameter in require_login() requires valid course parameter!
      /home/jake/moodledata/testmaster/moodle/lib/moodlelib.php:2270
      /home/jake/moodledata/testmaster/moodle/mod/bigbluebuttonbn/classes/local/helpers/files.php:252
      /home/jake/moodledata/testmaster/moodle/mod/bigbluebuttonbn/tests/local/helpers/files_test.php:187 

      I only noticed this since I was looking at some other code elsewhere that did the same. Seems to suggest that if we're passing $cm, we also need to pass the first param $course.

            Unassigned Unassigned
            jaked Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.