Skip to content

ExecutableFinder generates wrong Path #19913

Closed
@tschechniker

Description

@tschechniker

Hi,

the executableFinder is generating a wrong path if you have open_basedir in action.

For example you have installed java in /usr/bin/java and your open_basedir is set to /usr/bin/ the ExecutableFinder will return /usr/bin//java. The problem is that the open_basedir restrictions now say your are not allowed to access /usr/bin//java because of the two slashes.

See: https://github.com/symfony/process/blob/master/ExecutableFinder.php#L82

/**
* $dir = /usr/bin/
* $name = java
* $suffix = '' (empty)
*/
if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {

Best regards

Tobi

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