Skip to content

ResponseParser raises on valid protocol bytes in UTF-8-tagged input #760

Description

@OskarEichler

Problem

The public Net::IMAP::ResponseParser#parse path can receive a UTF-8-tagged String containing valid IMAP literal or quoted response bytes and raise Encoding::CompatibilityError. The same bytes parse when tagged binary. Socket input is normally binary, but the public parser should treat protocol input bytewise.

Prepared atomic commit c965ef5545b918b2515879ef817d4bd93d6d2b52 normalizes parser input to a binary view without mutating the caller. Current suites pass on Ruby 4.0.6 and 3.2.11; external models cover literal/quoted STATUS, ID data, frozen strings and ownership. No repository tests were modified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions