Skip to content

Shared Host : /dev/urandom is not within the allowed path(s) #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aborigines opened this issue Mar 29, 2014 · 2 comments
Closed

Shared Host : /dev/urandom is not within the allowed path(s) #18

aborigines opened this issue Mar 29, 2014 · 2 comments

Comments

@aborigines
Copy link

Shared Host : /dev/urandom is not within the allowed path(s)
env
debian6
php 5.3
apache2

diff --git a/URandom.php.original b/URandom.php
index 8d661f6..3f7d695 100644
--- a/URandom.php.original
+++ b/URandom.php
@@ -54,7 +54,7 @@ class URandom implements \PasswordLib\Random\Source {
      * @return string A string of the requested size
      */
     public function generate($size) {
-        if ($size == 0 || !file_exists($this->file)) {
+        if ($size == 0 || !@file_exists($this->file)) {
             return str_repeat(chr(0), $size);
         }
         $file = fopen($this->file, 'rb');
@ircmaxell
Copy link
Owner

can you re-submit this as a pull request?

@aborigines
Copy link
Author

Ok , Im sorry for late
thank you.

patch : #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants