only valid base64

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/304/head
Maxence Lange 2019-01-04 10:14:30 -01:00
rodzic 23ea6b663d
commit 89cd8fa88c
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -273,10 +273,11 @@ class LinkedDataSignature implements JsonSerializable {
$algo = OPENSSL_ALGO_SHA256; $algo = OPENSSL_ALGO_SHA256;
} }
if (openssl_verify( $signed = base64_decode($this->getSignatureValue());
$hashHeader . $hashObject, base64_decode($this->getSignatureValue()), if ($signed !== false
$this->getPublicKey(), $algo && openssl_verify(
) === 1) { $hashHeader . $hashObject, $signed, $this->getPublicKey(), $algo
) === 1) {
return true; return true;
} }