From a1154832ff6003d207f68b282b269201508528bb Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@7421 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 656caa3df..c964b09b1 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)