From bea9afed7daacd621a812bfc85f750d119ea8bdb Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 10 Nov 2015 11:59:15 +0000 Subject: [PATCH] Update random_compat to master. Clarifies strings, Merges [35587] upstream. See #34409, #28633 git-svn-id: https://develop.svn.wordpress.org/trunk@35600 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/random_compat/random.php | 4 ++-- src/wp-includes/random_compat/random_bytes_com_dotnet.php | 2 +- src/wp-includes/random_compat/random_bytes_dev_urandom.php | 2 +- src/wp-includes/random_compat/random_bytes_libsodium.php | 2 +- src/wp-includes/random_compat/random_bytes_mcrypt.php | 2 +- src/wp-includes/random_compat/random_bytes_openssl.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/random_compat/random.php b/src/wp-includes/random_compat/random.php index 6b28d4672e..d1f7555afa 100644 --- a/src/wp-includes/random_compat/random.php +++ b/src/wp-includes/random_compat/random.php @@ -110,8 +110,8 @@ if (PHP_VERSION_ID < 70000) { DIRECTORY_SEPARATOR === '/' && PHP_VERSION_ID >= 50300 ) || - // Windows with PHP >= 5.3.4 - PHP_VERSION_ID >= 50401 // Modification from upstream, see #34409 + // Windows with PHP >= 5.4.1 + PHP_VERSION_ID >= 50401 ) ) { // See random_bytes_openssl.php diff --git a/src/wp-includes/random_compat/random_bytes_com_dotnet.php b/src/wp-includes/random_compat/random_bytes_com_dotnet.php index c0ae639a8d..0a781f4efa 100644 --- a/src/wp-includes/random_compat/random_bytes_com_dotnet.php +++ b/src/wp-includes/random_compat/random_bytes_com_dotnet.php @@ -72,6 +72,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/src/wp-includes/random_compat/random_bytes_dev_urandom.php b/src/wp-includes/random_compat/random_bytes_dev_urandom.php index 5606dbbec9..aebcafcf7d 100644 --- a/src/wp-includes/random_compat/random_bytes_dev_urandom.php +++ b/src/wp-includes/random_compat/random_bytes_dev_urandom.php @@ -132,6 +132,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Error reading from source device' ); } diff --git a/src/wp-includes/random_compat/random_bytes_libsodium.php b/src/wp-includes/random_compat/random_bytes_libsodium.php index 796ba6a626..938cac9290 100644 --- a/src/wp-includes/random_compat/random_bytes_libsodium.php +++ b/src/wp-includes/random_compat/random_bytes_libsodium.php @@ -79,6 +79,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/src/wp-includes/random_compat/random_bytes_mcrypt.php b/src/wp-includes/random_compat/random_bytes_mcrypt.php index 8524c52245..5a1b688f60 100644 --- a/src/wp-includes/random_compat/random_bytes_mcrypt.php +++ b/src/wp-includes/random_compat/random_bytes_mcrypt.php @@ -67,6 +67,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/src/wp-includes/random_compat/random_bytes_openssl.php b/src/wp-includes/random_compat/random_bytes_openssl.php index db05e1fe3c..3e12d3da59 100644 --- a/src/wp-includes/random_compat/random_bytes_openssl.php +++ b/src/wp-includes/random_compat/random_bytes_openssl.php @@ -71,6 +71,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); }