Skip to content

Commit 5494168

Browse files
mudrd8mzstronk7
authored andcommitted
MDL-29148 MNet - improved handling of a verification function return code
1 parent 1f03315 commit 5494168

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mnet/xmlrpc/client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ function send($mnet_peer) {
295295

296296
// ok, it's signed, but is it signed with the right certificate ?
297297
// do this *after* we check for an out of date key
298-
if (!openssl_verify($this->xmlrpcresponse, base64_decode($sig_parser->signature), $mnet_peer->public_key)) {
298+
$verified = openssl_verify($this->xmlrpcresponse, base64_decode($sig_parser->signature), $mnet_peer->public_key);
299+
if ($verified != 1) {
299300
$this->error[] = 'Invalid signature';
300301
}
301302

0 commit comments

Comments
 (0)