-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Configuration line with certain lengths ignored #17030
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
Labels
Comments
bagder
added a commit
that referenced
this issue
Apr 11, 2025
Add test 743 to verify. Fixes #17030 Reported-by: Marius Kleidl
Thank you very much for patching this so quickly, Daniel! I can confirm that the problem is gone for the latest master branch. |
nbaws
pushed a commit
to nbaws/curl
that referenced
this issue
Apr 26, 2025
Add test 743 to verify. Fixes curl#17030 Reported-by: Marius Kleidl Closes curl#17031
nbaws
pushed a commit
to nbaws/curl
that referenced
this issue
Apr 26, 2025
Add test 743 to verify. Fixes curl#17030 Reported-by: Marius Kleidl Closes curl#17031
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
I created a configuration file (
curl-config.txt
) for curl's--config
with the following content:When saving this file, ensure that there is no trailing newline. Some editors automatically add a trailing newline, so you might have to disable that.
When running
curl --config curl-config.txt
, the verbose output indicates that curl sent a POST request without any body, ignoring thedata
instruction:I discovered that the last line in the configuration is ignored when there is no trailing newline and the last line's length is a multiple of 127. It happens for lines of 254, 381, 508 etc.
If a trailing newline is added or one
x
is added/removed, curl properly includes the body:I expected the following
Curl should send a request with a non-empty body.
curl/libcurl version
I confirmed that the bug is present in the current master branch. It was not present in curl 8.7.1. Bisecting the changes between these versions led me to believe that d8618f4 introduce the regression. The commit introduced a buffer of size 128, which is suspiciously close to the magic length of 127.
operating system
Linux 5.19.0-46-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 13:33:58 UTC 2023 aarch64 GNU/Linux
The text was updated successfully, but these errors were encountered: