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

uhttpd incorrectly terminates chunked message bodies on \r\n\r\n instead of 0\r\n\r\n. #10

Open
kenballus opened this issue Jul 16, 2024 · 1 comment

Comments

@kenballus
Copy link

When uhttpd receives a request with a chunked message body that is missing the final chunk size of 0, it treats the request as valid even though it should be rejected.

For example, uhttpd incorrectly accepts the following request:

POST / HTTP/1.1\r\n
Host: whatever\r\n
Transfer-Encoding: chunked\r\n
\r\n
1\r\n
Z\r\n
\r\n
\r\n
@kenballus kenballus changed the title uhttpd incorrectly terminates chunked message bodies on \r\n\rn\ instead of 0\r\n\r\n. uhttpd incorrectly terminates chunked message bodies on \r\n\r\n instead of 0\r\n\r\n. Jul 16, 2024
@kenballus
Copy link
Author

kenballus commented Jul 16, 2024

Further, it seems that uhttpd does not validate of the final chunk size, even if it is present. For example, the following request is accepted:

POST / HTTP/1.1\r\n
Host: whatever\r\n
Transfer-Encoding: chunked\r\n
\r\n
1\r\n
Z\r\n
INVALID!!!\r\n
\r\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant