diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-07-08 15:35:55 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-07-08 15:35:55 +0200 |
commit | 1ffa7cc9538c44781efcce1bdd777f507c40cb12 (patch) | |
tree | e7e9dd156d93e12f06ffde0bcd5a1104cce79be3 /phpMyAdmin-phpseclib.patch | |
parent | 11f58b76e34f3f3d81402773b9b5887001f8e91b (diff) |
phpMyAdmin: use system phpseclib
Diffstat (limited to 'phpMyAdmin-phpseclib.patch')
-rw-r--r-- | phpMyAdmin-phpseclib.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/phpMyAdmin-phpseclib.patch b/phpMyAdmin-phpseclib.patch new file mode 100644 index 0000000..87f254a --- /dev/null +++ b/phpMyAdmin-phpseclib.patch @@ -0,0 +1,56 @@ +From c6e76422c41e1c573c0c0163376a61d4556083b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com> +Date: Thu, 12 Jun 2014 10:06:20 +0200 +Subject: [PATCH] Allow to use system phpseclib +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michal Čihař <michal@cihar.com> +--- + doc/vendors.rst | 3 ++- + libraries/plugins/auth/AuthenticationCookie.class.php | 4 ++-- + libraries/vendor_config.php | 5 +++++ + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/libraries/plugins/auth/AuthenticationCookie.class.php b/libraries/plugins/auth/AuthenticationCookie.class.php +index 9683b78..88bd852 100644 +--- a/libraries/plugins/auth/AuthenticationCookie.class.php ++++ b/libraries/plugins/auth/AuthenticationCookie.class.php +@@ -718,7 +718,7 @@ public function blowfishEncrypt($data, $secret) + * if/then/else logic, however the include_once + * call is costly + */ +- include_once "./libraries/phpseclib/Crypt/AES.php"; ++ include_once PHPSECLIB_INC_DIR . '/Crypt/AES.php'; + $cipher = new Crypt_AES(CRYPT_AES_MODE_ECB); + $cipher->setKey($secret); + return base64_encode($cipher->encrypt($data)); +@@ -750,7 +750,7 @@ public function blowfishDecrypt($encdata, $secret) + $this->_blowfish_iv = base64_decode($_COOKIE['pma_mcrypt_iv'], true); + } + if (! function_exists('mcrypt_encrypt')) { +- include_once "./libraries/phpseclib/Crypt/AES.php"; ++ include_once PHPSECLIB_INC_DIR . '/Crypt/AES.php'; + $cipher = new Crypt_AES(CRYPT_AES_MODE_ECB); + $cipher->setKey($secret); + return $cipher->decrypt(base64_decode($encdata)); +diff --git a/libraries/vendor_config.php b/libraries/vendor_config.php +index ea72b64..0ba36b0 100644 +--- a/libraries/vendor_config.php ++++ b/libraries/vendor_config.php +@@ -75,6 +75,11 @@ + define('TCPDF_INC', './libraries/tcpdf/tcpdf.php'); + + /** ++ * Path to the phpseclib. Useful when you want to use system phpseclib. ++ */ ++define('PHPSECLIB_INC_DIR', './libraries/phpseclib/'); ++ ++/** + * Avoid referring to nonexistent files (causes warnings when open_basedir + * is used) + */ +-- +1.9.3 + |