8000 [Process] ExecutableFinder::find() method will execute `exec()` by passed the name parameter · Issue #53479 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Process] ExecutableFinder::find() method will execute exec() by passed the name parameter #53479
@kayw-geek

Description

@kayw-geek

Symfony version(s) affected

v6.4.2

How to reproduce

In my Laravel project composer.json file, script defined a few script like that

"post-update-cmd": [
            "@php -r \"file_put_contents('storage/local/last-composer-lock-hash', md5_file('composer.lock'));\""
        ],

when I run composer run script post-update-cmd the composer package will remove the prefix @php and extract -r to determine if the file is executable, and then the exec('command -v') will execute -r that exec('command -v -r') and output a message that "sh: line 0: command: -r: invalid option
command: usage: command [-pVv] command [arg ...]
"

Possible Solution

I want to pull a PR to update the exec() function, What do you think about that?

Additional Context

No response

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

      0