diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-29 18:03:40 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-29 19:14:46 +0000 |
commit | 1ebe15c3a9807233cc92a92668b9090777daa9e1 (patch) | |
tree | 526816a71ea29ae0df378fd1efe1981a5ec4c088 /test | |
parent | cf68f1fbdbb5eefd87647fb8be0ee74568f8556d (diff) |
CHUNKING: Reject messages with malformed line ending. Bug 2000
Actually test only the first header line, but still do full line-ending canonicalisation on the
remainder of the message in case a Evil Person slips past that.
Diffstat (limited to 'test')
-rw-r--r-- | test/log/0900 | 1 | ||||
-rw-r--r-- | test/rejectlog/0900 | 4 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0900 | 26 | ||||
-rw-r--r-- | test/stdout/0900 | 33 |
4 files changed, 64 insertions, 0 deletions
diff --git a/test/log/0900 b/test/log/0900 index 8ce3bcb0f..cf02d983a 100644 --- a/test/log/0900 +++ b/test/log/0900 @@ -9,3 +9,4 @@ 1999-03-02 09:44:33 SMTP connection from (tester) [127.0.0.1] lost while reading message data 1999-03-02 09:44:33 10HmbB-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss for CALLER@test.ex 1999-03-02 09:44:33 H=(tester) [127.0.0.1] F=<someone@some.domain> rejected RCPT <dummy@reject.ex>: relay not permitted +1999-03-02 09:44:33 rejected from <someone@some.domain> H=(tester) [127.0.0.1]: Non-CRLF-terminated header, under CHUNKING: message abandoned diff --git a/test/rejectlog/0900 b/test/rejectlog/0900 index 4c194b510..e5eb296d5 100644 --- a/test/rejectlog/0900 +++ b/test/rejectlog/0900 @@ -1,3 +1,7 @@ ******** SERVER ******** 1999-03-02 09:44:33 H=(tester) [127.0.0.1] F=<someone@some.domain> rejected RCPT <dummy@reject.ex>: relay not permitted +1999-03-02 09:44:33 rejected from <someone@some.domain> H=(tester) [127.0.0.1]: Non-CRLF-terminated header, under CHUNKING: message abandoned +Envelope-from: <someone@some.domain> +Envelope-to: <CALLER@test.ex> + To: Susan@random.com diff --git a/test/scripts/0000-Basic/0900 b/test/scripts/0000-Basic/0900 index 9e014c43e..4503ae0c0 100644 --- a/test/scripts/0000-Basic/0900 +++ b/test/scripts/0000-Basic/0900 @@ -215,5 +215,31 @@ quit ??? 221 **** # +# plain, small message (no body) +# header line with bad line-ending +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@test.ex +??? 250 +bdat 87 last +>>> To: Susan@random.com\n +From: Sam@random.com +Subject: This is a Bodyless test message + +??? 552 +quit +??? 221 +**** +# +# killdaemon no_msglog_check diff --git a/test/stdout/0900 b/test/stdout/0900 index 70c527c17..72269fad9 100644 --- a/test/stdout/0900 +++ b/test/stdout/0900 @@ -296,3 +296,36 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 221 <<< 221 testhost.test.ex closing connection End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-testhost.test.ex Hello tester [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@test.ex +??? 250 +<<< 250 Accepted +>>> bdat 87 last +>>> To: Susan@random.com\n +>>> From: Sam@random.com +>>> Subject: This is a Bodyless test message +>>> +??? 552 +<<< 552 Message header not CRLF terminated +>>> quit +??? 221 +<<< 221 testhost.test.ex closing connection +End of script |