-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Set post option to false disables upload #9849
Comments
e.g. in code:
move the line "data->set.upload = FALSE;" up three lines into the block for when value is true. |
For what purpose are you setting this option ? I don't think setting upload to false is a bug. |
This is for sending email via SMTP. We use various classes in programming and they have properties for CURL options like post, upload or URL. We transfer them to curl later. We wouldn't expect to set Upload = true and Post = false and then end up having Upload = false. |
You need to provide a better motivation than that. There is no clear "opposite" of POST so its not just a boolean on/off, which is why setting the option to any value will do something. The change here that you don't like fixed a security problem so while I'm prepared to discuss other ways to go about that. It seems to me you can just avoid setting POST in the first place since it is not used for SMTP at all? |
Now that I know it, we'll work around it. |
Why do you set POST at all? And why do you set POST and UPLOAD? |
because a curl object may be reused and I may not now what was set before? As said, the code used to work and set Post to false and Upload to true for sending an email. |
But there is such thing as "un-POSTING" by setting POST to 0. There is no opposite of POST. You need to instead set what you want it to do. Like UPLOAD. |
Bug: curl#9849 Reported-by: MonkeybreadSoftware@users.noreply.github.com Closes #xxxx
As a side node, I think it might be a good idea to update the documentation for |
It's already noted: When setting CURLOPT_MIMEPOST to NULL, libcurl resets the request type for HTTP to the default to disable the POST. Typically that would mean it is reset to GET. Instead you should set a desired request method explicitly. |
A client updated an application using curl library for sending emails via SMTP.
After "235 Authentication succeeded", we see that CURL sends VRFY commands instead of RCPT TO.
In smtp.c, I see that data->set.upload is not set, but in set opt.c I see it is set.
Later it turns out that setting Post to 0 also sets Upload option to 0.
May it be reasonable to request that setting Post to 1 clears upload flag and setting post to 0 lets it alone?
The text was updated successfully, but these errors were encountered: