Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long quoted-printable lines break parsing #137

Open
emersion opened this issue Jun 18, 2021 · 2 comments
Open

Long quoted-printable lines break parsing #137

emersion opened this issue Jun 18, 2021 · 2 comments

Comments

@emersion
Copy link
Owner

Quoted-printable lines must have a length limit according to the RFC but some software doesn't do that. This ends up error'ing out in the stdlib's parser.

Tentiative fix in #120 was rejected.

@Simerax
Copy link

Simerax commented Oct 6, 2022

This also happens when you write a message instead of reading it. https://go.dev/play/p/NFGUFd02gnS

While it is correct that quoted-printable lines have a length limit the currently returned error bufio: buffer full makes it hard to pinpoint the problem when writing a multipart message.

Maybe the error message could be improved by returing a specific error to represent this problem.

@Spiral90210
Copy link
Contributor

I've fixed this in our fork, open to a PR for it? I've had to copy the stdlib parser to fix it, and some other fixes in there for malformed mail I've seen in the wild trying to decode. Some are very specific and do slow down processing, so I was actually going to make a PR to allow setting of custom decoders, so I can stay up to date with upstream more easily. This one though is a very light touch.

Generally my rule is if outlook handles it, I'm going to try and find a way to do same. I do not handle writing errors, vast majority of my use case is reading.

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

No branches or pull requests

3 participants