Upgrade phpseclib to version 3
Signed-off-by: Maurício Meneghini Fauth <mauricio@php.net>
This commit is contained in:
parent
5b881280f9
commit
9f5a72f45e
@ -51,7 +51,7 @@
|
||||
"phpmyadmin/shapefile": "^3.0.1",
|
||||
"phpmyadmin/sql-parser": "^5.0",
|
||||
"phpmyadmin/twig-i18n-extension": "^3.0",
|
||||
"phpseclib/phpseclib": "^2.0",
|
||||
"phpseclib/phpseclib": "^3.0",
|
||||
"symfony/config": "^5.2.3",
|
||||
"symfony/dependency-injection": "^5.2.3",
|
||||
"symfony/expression-language": "^5.2.3",
|
||||
@ -61,7 +61,6 @@
|
||||
"williamdes/mariadb-mysql-kbs": "^1.2"
|
||||
},
|
||||
"conflict": {
|
||||
"phpseclib/phpseclib": "2.0.8",
|
||||
"tecnickcom/tcpdf": "<6.2",
|
||||
"pragmarx/google2fa": "<6.1.0 || >8.0",
|
||||
"pragmarx/google2fa-qrcode": "<1.0.1",
|
||||
|
||||
@ -19,8 +19,8 @@ use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Utils\SessionCache;
|
||||
use phpseclib\Crypt;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib3\Crypt\AES;
|
||||
use phpseclib3\Crypt\Random;
|
||||
use ReCaptcha;
|
||||
use function base64_decode;
|
||||
use function base64_encode;
|
||||
@ -679,7 +679,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
if ($this->useOpenSsl) {
|
||||
$_SESSION['encryption_key'] = openssl_random_pseudo_bytes(32);
|
||||
} else {
|
||||
$_SESSION['encryption_key'] = Crypt\Random::string(32);
|
||||
$_SESSION['encryption_key'] = Random::string(32);
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,7 +794,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
$iv
|
||||
);
|
||||
} else {
|
||||
$cipher = new Crypt\AES(Crypt\Base::MODE_CBC);
|
||||
$cipher = new AES('cbc');
|
||||
$cipher->setIV($iv);
|
||||
$cipher->setKey($aes_secret);
|
||||
$result = base64_encode($cipher->encrypt($data));
|
||||
@ -850,7 +850,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
base64_decode($data['iv'])
|
||||
);
|
||||
} else {
|
||||
$cipher = new Crypt\AES(Crypt\Base::MODE_CBC);
|
||||
$cipher = new AES('cbc');
|
||||
$cipher->setIV(base64_decode($data['iv']));
|
||||
$cipher->setKey($aes_secret);
|
||||
$result = $cipher->decrypt(base64_decode($data['payload']));
|
||||
@ -871,7 +871,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
return openssl_cipher_iv_length('AES-128-CBC');
|
||||
}
|
||||
|
||||
return (new Crypt\AES(Crypt\Base::MODE_CBC))->block_size;
|
||||
return (new AES('cbc'))->getBlockLengthInBytes();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -894,7 +894,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
);
|
||||
}
|
||||
|
||||
return Crypt\Random::string(
|
||||
return Random::string(
|
||||
$this->getIVSize()
|
||||
);
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ use PhpMyAdmin\SqlParser\Components\Expression;
|
||||
use PhpMyAdmin\SqlParser\Context;
|
||||
use PhpMyAdmin\SqlParser\Token;
|
||||
use PhpMyAdmin\Utils\SessionCache;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib3\Crypt\Random;
|
||||
use stdClass;
|
||||
use const ENT_COMPAT;
|
||||
use const ENT_QUOTES;
|
||||
|
||||
@ -189,7 +189,6 @@ cleanup_composer_vendors() {
|
||||
vendor/google/recaptcha/tests/
|
||||
find vendor/phpseclib/phpseclib/phpseclib/Crypt/ -maxdepth 1 -type f \
|
||||
-not -name AES.php \
|
||||
-not -name Base.php \
|
||||
-not -name Random.php \
|
||||
-not -name Rijndael.php \
|
||||
-print0 | xargs -0 rm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user