-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
curl_easy_escape used to accept empty string arguments, now returns error code #5601
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
No, it was not intentional. The change of internal representation should not effect the public API. I consider this a bug. |
bagder
added a commit
that referenced
this issue
Jun 24, 2020
Regression added in 7.71.0. Fixes #5601 Reported-by: Kristoffer Gleditsch
That was quick - thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
We have this code adding proxy username and password to a request:
I expected the following
Up to and including curl 7.70.0, the code above has produced the expected output, also for empty passwords.
After upgrading to 7.71.0, this code warns about failure to escape the proxy passwords in a test case where
getProxyPassword()
returns an empty string, "".I suspect this has to do with the changes to lib/escape.c done in this commit. DYNBUF.md says it
Returns a char * to the buffer if it has a length, otherwise a NULL.
. If I understand this correctly, this means an empty string passed intocurl_easy_escape()
will now return an error (NULL) instead of a pointer to an empty string buffer.This is easy enough to work around, by checking for string emptiness before calling
curl_easy_escape()
, but is it intentional?curl/libcurl version
7.71.0
operating system
Linux
The text was updated successfully, but these errors were encountered: