Make WordPress Core

Ticket #10727: 10727.2.patch

File 10727.2.patch, 1.1 KB (added by hakre, 15 years ago)

upgrade of phpass to version 0.2

  • wp-includes/class-phpass.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    33 * Portable PHP password hashing framework.
    44 * @package phpass
    55 * @since 2.5
    6  * @version 0.1
     6 * @version 0.2 / genuine
    77 * @link http://www.openwall.com/phpass/
    88 */
    99
     
    2929 * Portable PHP password hashing framework.
    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
    3535 */
     
    5050                $this->portable_hashes = $portable_hashes;
    5151
    5252                $this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE);
    53 
    5453        }
    5554
    5655        function get_random_bytes($count)
    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);
    6262                }