[Pkg-owncloud-commits] [owncloud] 41/67: Use /dev/urandom instead of /dev/random

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:10:40 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.

commit 9faae4b71c18c925d22141556607b0f877b9bd58
Author: Lukas Reschke <lukas at statuscode.ch>
Date:   Mon Oct 15 19:21:37 2012 +0200

    Use /dev/urandom instead of /dev/random
    
    The usage of /dev/urandom is enough secure
---
 lib/util.php |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/util.php b/lib/util.php
index eeed82f..1471b0c 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -571,8 +571,8 @@ class OC_Util {
 			}
 		}
 
-		// Try to use /dev/random
-		$fp = @file_get_contents('/dev/random', false, null, 0, $length);
+		// Try to use /dev/urandom
+		$fp = @file_get_contents('/dev/urandom', false, null, 0, $length);
 		if ($fp !== FALSE) {
 			$string = substr(bin2hex($fp), 0, $length);  
 			return $string;
@@ -605,8 +605,8 @@ class OC_Util {
 			}
 		}
 
-		// Check /dev/random
-		$fp = @file_get_contents('/dev/random', false, null, 0, 1);
+		// Check /dev/urandom
+		$fp = @file_get_contents('/dev/urandom', false, null, 0, 1);
 		if ($fp !== FALSE) {
 			return true;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list