diff --git a/catalog/admin/includes/classes/passwordhash.php b/catalog/admin/includes/classes/passwordhash.php index 12958c7f1..55e80ceab 100644 --- a/catalog/admin/includes/classes/passwordhash.php +++ b/catalog/admin/includes/classes/passwordhash.php @@ -3,6 +3,7 @@ # Portable PHP password hashing framework. # # Version 0.3 / genuine. +# Version 0.3 / osCommerce (silenced @is_readable('/dev/urandom')) # # Written by Solar Designer in 2004-2006 and placed in # the public domain. Revised in subsequent years, still public domain. @@ -48,7 +49,7 @@ function PasswordHash($iteration_count_log2, $portable_hashes) function get_random_bytes($count) { $output = ''; - if (is_readable('/dev/urandom') && + if (@is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) { $output = fread($fh, $count); fclose($fh); diff --git a/catalog/includes/classes/passwordhash.php b/catalog/includes/classes/passwordhash.php index 12958c7f1..55e80ceab 100644 --- a/catalog/includes/classes/passwordhash.php +++ b/catalog/includes/classes/passwordhash.php @@ -3,6 +3,7 @@ # Portable PHP password hashing framework. # # Version 0.3 / genuine. +# Version 0.3 / osCommerce (silenced @is_readable('/dev/urandom')) # # Written by Solar Designer in 2004-2006 and placed in # the public domain. Revised in subsequent years, still public domain. @@ -48,7 +49,7 @@ function PasswordHash($iteration_count_log2, $portable_hashes) function get_random_bytes($count) { $output = ''; - if (is_readable('/dev/urandom') && + if (@is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) { $output = fread($fh, $count); fclose($fh);