git » chasquid » master » tree

[master] / test / t-12-minor_dialogs / bad_data_dot_2.cmy

c tcp_connect localhost:1025

c <~ 220
c -> EHLO localhost
c <... 250 HELP
c -> MAIL FROM: <>
c <~ 250
c -> RCPT TO: user@testserver
c <~ 250
c -> DATA
c <~ 354
c -> From: Mailer daemon <somewhere@horns.com>
c -> Subject: I've come to haunt you
c -> 
c -> Muahahahaha
c -> 

# An MTA must not accept isolated line breaks, otherwise it may fall victim to
# an SMTP smuggling attack. See readUntilDot for more details.
# This test triggers that condition with an invalid dot-ending, so we verify
# the server returns an error in this case.
c ~> 'xxx\n.\n'

c -> That was a bad line ending, this is a good one.
c ~> '\r\n.\r\n'

c <- 521 5.5.2 Error reading DATA: invalid line ending