Skip to content

double leading dot on first line in DotTerminatedMessageWriter#398

Open
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:double-leading-dot-message-writer
Open

double leading dot on first line in DotTerminatedMessageWriter#398
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:double-leading-dot-message-writer

Conversation

@dxbjavid
Copy link
Copy Markdown
Contributor

@dxbjavid dxbjavid commented Jun 1, 2026

DotTerminatedMessageWriter starts in NOTHING_SPECIAL_STATE, so a period at the very start of the message isn't doubled even though it's the start of a line. A body beginning with "." then CRLF therefore ends the data phase early (SMTP DATA, NNTP POST, POP3), letting the following text be read as protocol commands. Initialize the state to LAST_WAS_NL_STATE so the message start is treated as a line start, matching the reader's un-stuffing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant