From 149b4d213131d4d453fe190700a4ecc3d09de9cc Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 3 Apr 2021 18:16:59 -0500 Subject: [PATCH] RSA: fix for PHP8 --- phpseclib/Crypt/RSA.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index c5f697701..49a61f3b3 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -3128,7 +3128,9 @@ function _rsassa_pkcs1_v1_5_verify($m, $s) } // Compare - return $this->_equals($em, $em2) || $this->_equals($em, $em3); + + return ($em2 !== false && $this->_equals($em, $em2)) || + ($em3 !== false && $this->_equals($em, $em3)); } /**