Skip to content

reject CR/LF in IMAP quoteMailboxName#399

Open
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:imap-mailbox-crlf
Open

reject CR/LF in IMAP quoteMailboxName#399
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:imap-mailbox-crlf

Conversation

@dxbjavid
Copy link
Copy Markdown
Contributor

@dxbjavid dxbjavid commented Jun 2, 2026

quoteMailboxName is what wraps mailbox names before they go into SELECT/CREATE/RENAME/COPY/etc., but it only quotes when the value has a space and never looks at line terminators. A name like INBOX\r\nA001 DELETE "Sent" is passed through untouched, so the CRLF ends the line and the rest is sent as a second IMAP command on the control connection. Rejecting CR/LF here, the same way SimpleSMTPHeader/SimpleNNTPHeader already do, closes that off without changing the existing quoting behavior.

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