Permalink
Browse files

MDL-20639 fixed mnet security trouble - credit goes to Adrian Schlegel

  • Loading branch information...
1 parent 3786d95 commit 279929dd13010d529dac81a15840a3d13059dbb1 @skodak skodak committed Nov 17, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 mnet/lib.php
View
@@ -458,9 +458,9 @@ function mnet_permit_rpc_call($includefile, $functionname, $class=false) {
h2s.hostid in ($id_list) AND
h2s.publish = '1'";
- $permissionobj = record_exists_sql($sql);
+ $permission = count_records_sql($sql);
- if ($permissionobj === false && 'dangerous' != $CFG->mnet_dispatcher_mode) {
+ if (!$permission && 'dangerous' != $CFG->mnet_dispatcher_mode) {
return RPC_FORBIDDENMETHOD;
}

0 comments on commit 279929d

Please sign in to comment.