Earlier quoted context omitted.
The real problem is that SMTP is a "plain-text" protocol that includes in-band signaling. It literally happened because SMTP defined "a line that only contains a single period in it" as a control sequence and not a literal line that only contains a single period in it. SMTP is an example of an unnecessarily complex design, and the implementation bugs reflect it. SMTP shouldn't be hard for someone to correctly impleme…
Why didn't they use actual control sequences instead of text chars, ASCII had plenty of those?
The curious case of the missing period
111–120 of 201 posts
Re: The curious case of the missing period
#112- The SMTP client spec says that an additional period would be added here.
- The SMTP server spec says that it would remove this additional period, bringing us back to one period.
I don’t get how this led to there being no period at all. Am I missing something?
Re: The curious case of the missing period
#113- The SMTP client they implemented could insert a newline such that a line was comprised of only a single period. - The SMTP client spec says that an additional period would be added here. - The SMTP server spec says that it would remove this additional period, bringing us back to one period. I don’t get how this led to there being no period at all. Am I missing something?
Re: The curious case of the missing period
#114Re: The curious case of the missing period
#115Re: The curious case of the missing period
#116> A portion of this code implemented a SMTP client. If I wanted to root cause this, the real problem is right there. Implementing protocols correctly is hard and bugs like in the post are common. A properly implemented SMTP client library, like one you would pull off the shelf, would accept text and encode it properly per the SMTP protocol, regardless of where the periods were in the input. The templating layer shoul…
Re: The curious case of the missing period
#117Re: The curious case of the missing period
#118Why is it implemented that way?
If a single period means end of mail then more than a period means it's mail data.
Why deleting the period in the first place? Couldn't they store one byte to check the next?
Re: The curious case of the missing period
#119;-)
Re: The curious case of the missing period
#120>the first character is a period and there are other characters on the line, the first character is deleted. Why is it implemented that way? If a single period means end of mail then more than a period means it's mail data. Why deleting the period in the first place? Couldn't they store one byte to check the next?
. Ends body
.. One period
Anyway that’s stupid and only helps if you compose your email right in a tcp session.