Skip to content

Incorrect handling of body_text_encoded results in lots of NULL chars #24

@FlyingDR

Description

@FlyingDR

As part of haraka/Haraka#2737 which was included in Haraka since 2.8.26, there was an unexpected change of the type of Body.body_text_encoded from string to Buffer. Moreover, the new Buffer is of fixed size and requires Buffer.slice() to get actual contents.

Of course, it is a question to Haraka developers about reasons to change types in patch-level release, but it is possible that they're treating Body.body_text_encoded as an internal property.

Anyway, this change caused getBodyOfTypeFromChildren function to return a 64kb string mostly filled with \u0000 chars in a case if body_text_encoded was selected as a source.

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