Skip to content

Commit

Permalink
MDL-15933 Require jump destination MNET peer to be non-deleted.
Browse files Browse the repository at this point in the history
Also require landing source MNET peer to be non-deleted.
  • Loading branch information
peterbulmer committed Aug 11, 2008
1 parent 5c657e7 commit dbca4e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auth/mnet/auth.php
Expand Up @@ -241,7 +241,7 @@ function confirm_mnet_session($token, $remotewwwroot) {
require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';

// verify the remote host is configured locally before attempting RPC call
if (! $remotehost = $DB->get_record('mnet_host', array('wwwroot'=>$remotewwwroot))) {
if (! $remotehost = $DB->get_record('mnet_host', array('wwwroot' => $remotewwwroot, 'deleted' => 0))) {
print_error('notpermittedtoland', 'mnet');
}

Expand Down Expand Up @@ -1302,9 +1302,12 @@ function has_service($mnethostid, $servicename) {
svc.apiversion,
h2s.id as h2s_id
FROM
{mnet_host} h,
{mnet_service} svc,
{mnet_host2service} h2s
WHERE
h.deleted = '0' AND
h.id = h2s.hostid AND
h2s.hostid = ? AND
h2s.serviceid = svc.id AND
svc.name = ? AND
Expand Down

0 comments on commit dbca4e4

Please sign in to comment.