Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
bbsan2k opened this issue Feb 12, 2022 · 0 comments · Fixed by #6280
Closed
1 task done

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

bbsan2k opened this issue Feb 12, 2022 · 0 comments · Fixed by #6280
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@bbsan2k
Copy link
Contributor

bbsan2k commented Feb 12, 2022

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.
@bbsan2k bbsan2k added the Status: Awaiting triage Issue is waiting for triage label Feb 12, 2022
me-no-dev pushed a commit that referenced this issue Feb 16, 2022
* Check for cookieJar before setting cookies

* Return as soon as possible w/o _cookieJar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant