Skip to content

Fix parsing IMAP responses containing 8-bit bytes - #177

Merged
stevebauman merged 2 commits into
masterfrom
bug-175
Aug 10, 2026
Merged

Fix parsing IMAP responses containing 8-bit bytes#177
stevebauman merged 2 commits into
masterfrom
bug-175

Conversation

@stevebauman

@stevebauman stevebauman commented Aug 10, 2026

Copy link
Copy Markdown
Member

Closes #175

This PR fixes the tokenizer throwing an exception when an IMAP server includes 8-bit bytes in human-readable response text.

The tokenizer previously accepted only printable ASCII characters inside ATOMs. As a result, responses containing raw bytes from mailbox names would stop at the first 8-bit byte and leave the rest of the response unread.

ATOMs now reject only control bytes and DEL while continuing to split on the existing delimiters. This allows the complete response to be consumed while preserving the protection against invalid control bytes added in #172.

@stevebauman
stevebauman marked this pull request as ready for review August 10, 2026 01:55
@stevebauman
stevebauman merged commit 4219a60 into master Aug 10, 2026
13 checks passed
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.

8-bit bytes in resp-text abort the response and leave the connection out of step

1 participant