From 7ba07c80a16cd4ce711b5ac62d3632ae4145e9a9 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Thu, 17 May 2012 11:31:06 +0100 Subject: smtp: Fixed non-escaping of dot character at beginning of line A dot character at the beginning of a line would not be escaped to a double dot as required by RFC-2821, instead it would be deleted by the mail server. Please see section 4.5.2 of the RFC for more information. Note: This fix also simplifies the detection of repeated CRLF.CRLF combinations, such as CRLF.CRLF.CRLF, a little rather than having to advance the eob counter to 2. --- lib/smtp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/smtp.h') diff --git a/lib/smtp.h b/lib/smtp.h index 502f65cbe..55f169e02 100644 --- a/lib/smtp.h +++ b/lib/smtp.h @@ -82,6 +82,7 @@ extern const struct Curl_handler Curl_handler_smtps; /* this is the 5-bytes End-Of-Body marker for SMTP */ #define SMTP_EOB "\x0d\x0a\x2e\x0d\x0a" #define SMTP_EOB_LEN 5 +#define SMTP_EOB_FIND_LEN 3 /* if found in data, replace it with this string instead */ #define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e" -- cgit v1.2.3