From 68cefffdc99c4b85a44861b9ff0a211f5dad3711 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 29 Feb 2016 18:58:25 +0000 Subject: Fix #861 and update dependencies --- vendor/paragonie/random_compat/CHANGELOG.md | 11 +++++++++-- vendor/paragonie/random_compat/lib/random.php | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'vendor/paragonie') diff --git a/vendor/paragonie/random_compat/CHANGELOG.md b/vendor/paragonie/random_compat/CHANGELOG.md index f5f1927411..4839b4632c 100644 --- a/vendor/paragonie/random_compat/CHANGELOG.md +++ b/vendor/paragonie/random_compat/CHANGELOG.md @@ -1,4 +1,11 @@ -### Version 1.2.0 - 2015-02-05 +### Version 1.2.1 - 2016-02-29 + +* PHP 5.6.10 - 5.6.12 will hang when mcrypt is used on Unix-based operating + systems ([PHP bug 69833](https://bugs.php.net/bug.php?id=69833)). If you are + running one of these versions, please upgrade (or make sure `/dev/urandom` is + readable) otherwise you're relying on OpenSSL. + +### Version 1.2.0 - 2016-02-05 * Whitespace and other cosmetic changes * Added a changelog. @@ -8,7 +15,7 @@ Every time we publish a new release, we will also upload a .phar to Github. Our public key is signed by our GPG key. -### Version 1.1.6 - 2015-01-29 +### Version 1.1.6 - 2016-01-29 * Eliminate `open_basedir` warnings by detecting this configuration setting. (Thanks [@oucil](https://github.com/oucil) for reporting this.) diff --git a/vendor/paragonie/random_compat/lib/random.php b/vendor/paragonie/random_compat/lib/random.php index 42237ea17b..ff6c7c7fb8 100644 --- a/vendor/paragonie/random_compat/lib/random.php +++ b/vendor/paragonie/random_compat/lib/random.php @@ -113,8 +113,8 @@ if (PHP_VERSION_ID < 70000) { require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; } // Unset variables after use - $RandomCompatUrandom = null; $RandomCompat_basedir = null; + $RandomCompatUrandom = null; } /** @@ -127,8 +127,15 @@ if (PHP_VERSION_ID < 70000) { && extension_loaded('mcrypt') ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + if ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; + } } if ( -- cgit v1.3