Skip to content

Support for open_basedir containing more then one paths set #89

Open

Description

@mgrajcarek

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.

Activity

  1. enygma commented on Aug 5, 2015

    @enygma
    Member

    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.

  2. mgrajcarek commented on Aug 5, 2015

    @mgrajcarek
    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).

  3. enygma commented on Sep 9, 2015

    @enygma
    Member

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

  4. mgrajcarek commented on Sep 9, 2015

    @mgrajcarek
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions