Adds some PHP 8 ready changes to compiler classes. Adds Server and Crypt classes.

This commit is contained in:
2023-01-01 04:11:34 +02:00
parent e614f2ec23
commit e771e7d243
71 changed files with 2697 additions and 872 deletions

View File

@@ -2589,7 +2589,11 @@ abstract class SymmetricKey
$length = ord($text[strlen($text) - 1]);
if (!$length || $length > $this->block_size) {
if (!$length) {
// temp fix for FOFEncryptAes conversions
// Added by Llewellyn van der Merwe <joomla@vdm.io>
return rtrim($text, "\0");
} elseif ($length > $this->block_size) {
throw new BadDecryptionException("The ciphertext has an invalid padding length ($length) compared to the block size ({$this->block_size})");
}