这是indexloc提供的服务,不要输入任何密码
Skip to content

ParseHeader erroneously accepts spaces in header names #68

@alexwennerberg

Description

@alexwennerberg

This is an issue that I encountered in Aerc, which uses this library:

https://todo.sr.ht/~sircmpwn/aerc2/341

According to RFC5322, spaces are not valid in email header field names. This parser, however, erroneously accepts headers with spaces in them. Relevant code is linked here. I noticed a reference to RFC 7230 in this code, but I'm not familiar enough to understand why. Should we be following RFC 7320 or RFC 5322 for the email headers?

Let me know if I'm missing something or misunderstanding the RFCs. And I'd be happy to submit a pull request to fix this! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions