Changeset 12521 for trunk/wp-includes/class-phpass.php
- Timestamp:
- 12/23/2009 04:31:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-phpass.php
r8600 r12521 4 4 * @package phpass 5 5 * @since 2.5 6 * @version 0. 16 * @version 0.2 / genuine. 7 7 * @link http://www.openwall.com/phpass/ 8 8 */ … … 30 30 * 31 31 * @package phpass 32 * @version 0. 1 / genuine32 * @version 0.2 / genuine. 33 33 * @link http://www.openwall.com/phpass/ 34 34 * @since 2.5 … … 50 50 $this->portable_hashes = $portable_hashes; 51 51 52 $this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE); 53 52 $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compability reasons 54 53 } 55 54 … … 57 56 { 58 57 $output = ''; 59 if (($fh = @fopen('/dev/urandom', 'rb'))) { 58 if (is_readable('/dev/urandom') && 59 ($fh = @fopen('/dev/urandom', 'rb'))) { 60 60 $output = fread($fh, $count); 61 61 fclose($fh);
Note: See TracChangeset
for help on using the changeset viewer.