mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX #6287 open_basedir restriction breaks RandomGenerator when trying to read dev/urandom (from r115314)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115315 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b3bb0a721a
commit
f238823b27
@ -36,7 +36,7 @@ class RandomGenerator {
|
||||
}
|
||||
|
||||
// Read from the unix random number generator
|
||||
if(!$isWin && is_readable('/dev/urandom') && ($h = fopen('/dev/urandom', 'rb'))) {
|
||||
if(!$isWin && !ini_get('open_basedir') && is_readable('/dev/urandom') && ($h = fopen('/dev/urandom', 'rb'))) {
|
||||
$e = fread($h, 64);
|
||||
fclose($h);
|
||||
return $e;
|
||||
|
Loading…
x
Reference in New Issue
Block a user