Most moodle internal scripts like lib.php and locallib.php usually begin with at test to prevent direct script access like:
defined('MOODLE_INTERNAL') || die();
That check is missing from the lib.php
Most moodle internal scripts like lib.php and locallib.php usually begin with at test to prevent direct script access like:
defined('MOODLE_INTERNAL') || die();
That check is missing from the lib.php