Skip to content

HTTPClient: CookieJar is initialized as nullptr but never checked #6266

Closed
@bbsan2k

Description

@bbsan2k

Board

ESP32

Device Description

Any

Hardware Configuration

Any

Version

latest master

IDE Name

IDF

Operating System

macOS

Flash frequency

40MHz

PSRAM enabled

no

Upload speed

115200

Description

With the latest addition of _cookieJar for HTTPClient, the _cookieJar is initialized as nullptr, but no check before accessing it exists (for example in generateCookieString).
This means (unless it is explicetely set) we are running in a nullptr exception/panic at this point

Sketch

HTTPClient client;
client.begin("https://google.com/);

if (HTTP_CODE_OK == client.GET())
{
  // Do Stuff
}

Debug Message

None

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

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