Skip to content
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

Support for open_basedir containing more then one paths set #89

Open
mgrajcarek opened this issue Jul 20, 2015 · 4 comments
Open

Support for open_basedir containing more then one paths set #89

mgrajcarek opened this issue Jul 20, 2015 · 4 comments

Comments

@mgrajcarek
Copy link

Currently, if you open_basedir contains more then one path, for example:

open_basedir="/var/www:/php/tmp_cache"

consraints included in CheckSoapWsdlCacheDir and CheckUploadTmpDir are not passing at:

    if ($openBasedir === false) {
        $this->setDescription('The open_basedir did not resolve to a valid directory');
        $this->fail();
        return false;
    }

due to realpath usage, which returns false for coma separated paths:

    $openBasedir = realpath($openBasedir);

The idea is to split $openBasedir by PATH_SEPARATOR into an array of $openBasedirPaths and to check each one of them against included rules.

The question is, how should I treat it. If one of paths === false, then should entire test fails? Or maybe all of them should be equal false?

What do you think about it? I can prepare tommorow appropriate patch.

@enygma
Copy link
Member

enygma commented Aug 5, 2015

Sorry for the delay responding here - I'm of the "fail fast" mentality. I think that if even one of the paths is invalid the entire test should fail. The error message should be updated in the case of multiple directories, however, to tell the user which one failed.

@mgrajcarek
Copy link
Author

Ok. When I'll be back from holidays, I'll take care of it. Thanks for
response and shearing your work!
Cheers!

śr., 5 sie 2015, 03:30 Chris Cornutt użytkownik notifications@github.com
napisał:

Sorry for the delay responding here - I'm of the "fail fast" mentality. I
think that if even one of the paths is invalid the entire test should fail.
The error message should be updated in the case of multiple directories,
however, to tell the user which one failed.


Reply to this email directly or view it on GitHub
#89 (comment).

@enygma
Copy link
Member

enygma commented Sep 9, 2015

Hey @mgrajcarek, any update on this? Someone else mentioned it would be a nice feature to have too.

@mgrajcarek
Copy link
Author

Hi @enygma.
Sorry for a delay. I was little bit busy after vacations and it slipped my mind.
I will start working on it from this evening.

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

No branches or pull requests

2 participants