mirror of
https://github.com/moodle/moodle.git
synced 2025-03-15 05:00:06 +01:00
MDL-20639 fixed mnet security trouble - credit goes to Adrian Schlegel
This commit is contained in:
parent
99fd6ddec3
commit
3f226cc99f
@ -473,9 +473,10 @@ function mnet_permit_rpc_call($includefile, $functionname, $class=false) {
|
|||||||
h2s.hostid in ($id_list) AND
|
h2s.hostid in ($id_list) AND
|
||||||
h2s.publish = '1'";
|
h2s.publish = '1'";
|
||||||
$params = array("$callprefix/$functionname");
|
$params = array("$callprefix/$functionname");
|
||||||
$permissionobj = $DB->record_exists_sql($sql, $params);
|
|
||||||
|
|
||||||
if ($permissionobj === false && 'dangerous' != $CFG->mnet_dispatcher_mode) {
|
$permission = $DB->count_records_sql($sql, $params);
|
||||||
|
|
||||||
|
if (!$permission && 'dangerous' != $CFG->mnet_dispatcher_mode) {
|
||||||
return RPC_FORBIDDENMETHOD;
|
return RPC_FORBIDDENMETHOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user