WordPress.org

Make WordPress Core

Changeset 12521


Ignore:
Timestamp:
12/23/2009 04:31:57 PM (10 years ago)
Author:
ryan
Message:

Update phpass to 0.2. Props hakre. fixes #10727

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-phpass.php

    r8600 r12521  
    44 * @package phpass
    55 * @since 2.5
    6  * @version 0.1
     6 * @version 0.2 / genuine.
    77 * @link http://www.openwall.com/phpass/
    88 */
     
    3030 *
    3131 * @package phpass
    32  * @version 0.1 / genuine
     32 * @version 0.2 / genuine.
    3333 * @link http://www.openwall.com/phpass/
    3434 * @since 2.5
     
    5050        $this->portable_hashes = $portable_hashes;
    5151
    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
    5453    }
    5554
     
    5756    {
    5857        $output = '';
    59         if (($fh = @fopen('/dev/urandom', 'rb'))) {
     58        if (is_readable('/dev/urandom') &&
     59            ($fh = @fopen('/dev/urandom', 'rb'))) {
    6060            $output = fread($fh, $count);
    6161            fclose($fh);
Note: See TracChangeset for help on using the changeset viewer.