diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-15 19:21:37 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-15 19:21:37 +0200 |
commit | fa71e51e679b7a25de7ff8af31119721b6f13d3c (patch) | |
tree | f7fb642e62839d131a931a5e1ce6a3132365cf58 | |
parent | 24ad6b5a62244bb107cf915e75e9f8d8866497ec (diff) | |
download | nextcloud-server-fa71e51e679b7a25de7ff8af31119721b6f13d3c.tar.gz nextcloud-server-fa71e51e679b7a25de7ff8af31119721b6f13d3c.zip |
Use /dev/urandom instead of /dev/random
The usage of /dev/urandom is enough secure
-rwxr-xr-x | lib/util.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php index 7af28c920f0..c6b164adbe8 100755 --- a/lib/util.php +++ b/lib/util.php @@ -594,8 +594,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; @@ -628,8 +628,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; } |