mirror of
https://github.com/curl/curl.git
synced 2026-08-25 11:43:36 +03:00
smtp: fix processing of initial dot in data
RFC 5321 4.1.1.4 specifies the CRLF terminating the DATA command should be taken into account when chasing the <CRLF>.<CRLF> end marker. Thus a leading dot character in data is also subject to escaping. Tests 911 and test server are adapted to this situation. New tests 951 and 952 check proper handling of initial dot in data. Closes #2304
This commit is contained in:
parent
3f6051f4ed
commit
62cf2d180e
6 changed files with 98 additions and 4 deletions
|
|
@ -1289,6 +1289,11 @@ static CURLcode smtp_perform(struct connectdata *conn, bool *connected,
|
|||
/* Store the first recipient (or NULL if not specified) */
|
||||
smtp->rcpt = data->set.mail_rcpt;
|
||||
|
||||
/* Initial data character is the first character in line: it is implicitly
|
||||
preceded by a virtual CRLF. */
|
||||
smtp->trailing_crlf = TRUE;
|
||||
smtp->eob = 2;
|
||||
|
||||
/* Start the first command in the DO phase */
|
||||
if((data->set.upload || data->set.mimepost.kind) && data->set.mail_rcpt)
|
||||
/* MAIL transfer */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue