diff --git a/include/PasswordHash.php b/include/PasswordHash.php index a30f41137c1334522168deb428869d60c7ead7b2..b5b8efcadbb70123ddedc61ae673c15342f94955 100644 --- a/include/PasswordHash.php +++ b/include/PasswordHash.php @@ -48,7 +48,7 @@ class PasswordHash { 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/include/pear/Auth/SASL/DigestMD5.php b/include/pear/Auth/SASL/DigestMD5.php index 4534e500bb35712acc25b87f4272f6ba39132e42..e97e15daba0c01f2cc361ecffec3cd177fdb7ee0 100644 --- a/include/pear/Auth/SASL/DigestMD5.php +++ b/include/pear/Auth/SASL/DigestMD5.php @@ -178,10 +178,10 @@ class Auth_SASL_DigestMD5 extends Auth_SASL_Common */ function _getCnonce() { - if (file_exists('/dev/urandom') && $fd = @fopen('/dev/urandom', 'r')) { + if (@file_exists('/dev/urandom') && $fd = @fopen('/dev/urandom', 'r')) { return base64_encode(fread($fd, 32)); - } elseif (file_exists('/dev/random') && $fd = @fopen('/dev/random', 'r')) { + } elseif (@file_exists('/dev/random') && $fd = @fopen('/dev/random', 'r')) { return base64_encode(fread($fd, 32)); } else {