Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX #6287 open_basedir restriction breaks RandomGenerator when try…

…ing to read dev/urandom (from r115314)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115315 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit f238823b270ba853eacb5512cb1ccf80322276a3 1 parent b3bb0a7
@halkyon halkyon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  security/RandomGenerator.php
View
2  security/RandomGenerator.php
@@ -36,7 +36,7 @@ function generateEntropy() {
}
// 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;
Please sign in to comment.
Something went wrong with that request. Please try again.