Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

HttpClientDataCollector fails if proc_open is disabled via php.ini #58700

Copy link
Copy link
Closed
@ZaneCEO

Description

@ZaneCEO
Issue body actions

Symfony version(s) affected

7.1.6

Description

HttpClientDataCollector::escapePayload creates a new Process() -> it fails if proc_open is disabled:

The Process class relies on proc_open, which is not available on your PHP installation.

How to reproduce

        $request =
            $this->httpClient->request('POST', 'https://www.linkedin.com/oauth/v2/accessToken', [
                "body"  => [
                    "grant_type"    => "authorization_code",
                    "code"          => "11111111",
                    "redirect_uri"  => 'https://example.com',
                    "client_id"     => 'abc',
                    "client_secret" => 'ddd'
                ]
            ]);

        $content = $request->getContent(false);

        throw new \Exception();

Possible Solution

escapePayload could be modified to avoid new Process() and generate the command in-place.

Additional Context

escapePayload is called only if the request has either a json content or a body.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.