Permalink
Browse files

Merge branch 'm19-MDL-16858-fixed' of git://github.com/mouneyrac/mood…

…le into MOODLE_19_STABLE
  • Loading branch information...
2 parents 010758a + 612d671 commit 535037f5214d095f2bf980c9c9fb86ce89313e7b @skodak skodak committed Dec 27, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 mnet/xmlrpc/client.php
View
@@ -332,6 +332,14 @@ function send($mnet_peer) {
$this->error[] = $this->response['faultCode'] . " : " . $this->response['faultString'];
}
}
+
+ // ok, it's signed, but is it signed with the right certificate ?
+ // do this *after* we check for an out of date key
+ if (!openssl_verify($this->xmlrpcresponse, base64_decode($sig_parser->signature),
+ $mnet_peer->public_key)) {
+ $this->error[] = 'Invalid signature';
+ }
+
return empty($this->error);
}
}

0 comments on commit 535037f

Please sign in to comment.