phpass Warnings : Warning: is_readable(): open_basedir restriction in effect.

118 views
Skip to first unread message

Thomas PAPIN

unread,
Jan 6, 2014, 10:13:39 AM1/6/14
to joomla-de...@googlegroups.com
Hello,

I just noticed today, a bug in a phpass lib that was added with Joomla 3.2.X.
phpASS

In the following code, there is a check about if the file is readable or not.

if (is_readable('/dev/urandom') &&
            ($fh = @fopen('/dev/urandom', 'rb'))) {
            $output = fread($fh, $count);
            fclose($fh);
        }


but to check if readable or not php must access to it (WARNINGS: open_basedir) :

Warning: is_readable(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s):

Lot of similar topics on Drupal,WordPress,CodeIgniter, always the same solution
add a @ before is_readable to avoid this warning.

Is that ok for you ?

Thomas


Bakual

unread,
Jan 6, 2014, 11:57:01 AM1/6/14
to joomla-de...@googlegroups.com
Can you do a PR for that on GitHub and open a tracker item on JoomlaCode?
Reply all
Reply to author
Forward
0 new messages