From bb13754ad2d62b1336a6f8cb8aba04e579d20cab Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 20 Mar 2008 19:56:37 +0000 Subject: [PATCH] Use uniqid if getmypid is disabled. Props Solar Designer. fixes #6293 git-svn-id: https://develop.svn.wordpress.org/trunk@7421 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-phpass.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-phpass.php b/wp-includes/class-phpass.php index 656caa3df6..c964b09b10 100644 --- a/wp-includes/class-phpass.php +++ b/wp-includes/class-phpass.php @@ -48,7 +48,8 @@ class PasswordHash { $this->portable_hashes = $portable_hashes; - $this->random_state = microtime() . getmypid(); + $this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE); + } function get_random_bytes($count)