diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2018-02-12 16:43:15 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2018-02-12 16:43:15 +0100 |
commit | 62cf2d180ed77bb977acf5d8b348d4431256638f (patch) | |
tree | 38226912efdc7c236a670c2f865c60e51617d349 /tests/ftpserver.pl | |
parent | 3f6051f4ed2195a24adbc29036ee5ee0ef00b1e9 (diff) | |
download | curl-62cf2d180ed77bb977acf5d8b348d4431256638f.tar.gz |
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
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-x | tests/ftpserver.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 956275881..f7f4fa2ae 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -920,7 +920,7 @@ sub DATA_smtp { print FILE $line if(!$nosave); $raw .= $line; - if($raw =~ /\x0d\x0a\x2e\x0d\x0a/) { + if($raw =~ /(?:^|\x0d\x0a)\x2e\x0d\x0a/) { # end of data marker! $eob = 1; } |