Skip to content
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

Wrong condition in HTTP version check routine (esp_http_server component) (IDFGH-13878) #14723

Closed
3 tasks done
valkuc opened this issue Oct 14, 2024 · 3 comments
Closed
3 tasks done
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@valkuc
Copy link

valkuc commented Oct 14, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.3.1

Espressif SoC revision.

ESP32-C3

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

CMD

Development Kit.

Custom Board

Power Supply used.

USB

What is the expected behavior?

ESP HTTP server component should refuse to execute HTTP 1.0 request.

What is the actual behavior?

ESP HTTP server component executing HTTP 1.0 request.

Steps to reproduce.

Use curl to issue HTTP 1.0 request to ESP board:

curl -0 -v http://esp-board.local

Debug Logs.

No response

More Information.

There is an error in condition here

if ((parser->http_major != 1) && (parser->http_minor != 1)) {

Logical AND should be replaced with OR:

if ((parser->http_major != 1) || (parser->http_minor != 1))
@valkuc valkuc added the Type: Bug bugs in IDF label Oct 14, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 14, 2024
@github-actions github-actions bot changed the title Wrong condition in HTTP version check routine (esp_http_server component) Wrong condition in HTTP version check routine (esp_http_server component) (IDFGH-13878) Oct 14, 2024
@nileshkale123
Copy link
Collaborator

Hello @valkuc

Thank you for bringing this change to our attention. We've raised a merge request, which will be reflected in the main repository soon.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new Status: Reviewing Issue is being reviewed labels Oct 21, 2024
@AxelLin
Copy link
Contributor

AxelLin commented Nov 2, 2024

@nileshkale123 The release branches also need fix.

@nileshkale123
Copy link
Collaborator

Sure. It's already in progress.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants