From 8bc91e9b5837c4395ba1d932c56e30e1f8e8fdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 29 Nov 2017 09:34:44 +0100 Subject: [PATCH 1/2] Revert "Compatibility with phpseclib 2.0.8" This reverts commit a450935e53a130319b84ce180a3456009e2c04b4. We really need to stick on 2.0.7 for 4.7 branch to keep PHP 5.5 support. Issue #13846 --- ChangeLog | 1 - composer.json | 2 +- libraries/plugins/auth/AuthenticationCookie.php | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea1982b7d6..c6b09d33f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,6 @@ phpMyAdmin - ChangeLog - issue #13821 Lock page when changes are done in the SQL editor - issue #13842 Prefer iconv for encoding conversions - issue #13737 Fixed changing password on MariaDB cluster -- issue #13846 Compatibility with phpseclib 2.0.8 4.7.5 (2017-10-23) - issue #13615 Avoid problems with browsing unknown query types diff --git a/composer.json b/composer.json index 5e326aeac2..d7d70ce941 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "phpmyadmin/motranslator": "^3.0", "phpmyadmin/shapefile": "^2.0", "tecnickcom/tcpdf": "^6.2", - "phpseclib/phpseclib": "^2.0.8", + "phpseclib/phpseclib": "^2.0", "google/recaptcha": "^1.1" }, "suggest": { diff --git a/libraries/plugins/auth/AuthenticationCookie.php b/libraries/plugins/auth/AuthenticationCookie.php index f569592283..6d1c7bd264 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -762,7 +762,7 @@ class AuthenticationCookie extends AuthenticationPlugin $iv ); } else { - $cipher = new Crypt\AES('cbc'); + $cipher = new Crypt\AES(Crypt\Base::MODE_CBC); $cipher->setIV($iv); $cipher->setKey($aes_secret); $result = base64_encode($cipher->encrypt($data)); @@ -814,7 +814,7 @@ class AuthenticationCookie extends AuthenticationPlugin base64_decode($data['iv']) ); } else { - $cipher = new Crypt\AES('cbc'); + $cipher = new Crypt\AES(Crypt\Base::MODE_CBC); $cipher->setIV(base64_decode($data['iv'])); $cipher->setKey($aes_secret); $result = $cipher->decrypt(base64_decode($data['payload'])); @@ -833,8 +833,8 @@ class AuthenticationCookie extends AuthenticationPlugin if ($this->_use_openssl) { return openssl_cipher_iv_length('AES-128-CBC'); } - $cipher = new Crypt\AES('cbc'); - return $cipher->getBlockLengthInBytes(); + $cipher = new Crypt\AES(Crypt\Base::MODE_CBC); + return $cipher->block_size; } /** From f8ccc4db13d3255e3083d37886747580bc3ddf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 29 Nov 2017 09:35:39 +0100 Subject: [PATCH 2/2] Stick with phpseclib < 2.0.8 in 4.7 branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can not remove PHP 5.5 support from maintenance branch, so there is no other way than sticking with older phpseclib. See https://github.com/phpseclib/phpseclib/issues/1218 Issue #13846 Signed-off-by: Michal Čihař --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d7d70ce941..e2766b8768 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "phpmyadmin/motranslator": "^3.0", "phpmyadmin/shapefile": "^2.0", "tecnickcom/tcpdf": "^6.2", - "phpseclib/phpseclib": "^2.0", + "phpseclib/phpseclib": "^2.0,<2.0.8", "google/recaptcha": "^1.1" }, "suggest": {