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

Bug: Empty body leads to Internal Error #347

Closed
Yannik opened this issue Jan 25, 2023 · 3 comments
Closed

Bug: Empty body leads to Internal Error #347

Yannik opened this issue Jan 25, 2023 · 3 comments
Assignees
Labels
Milestone

Comments

@Yannik
Copy link

Yannik commented Jan 25, 2023

Hi,

I'd like to report a bug with this extension: A validly dkim-signed mail with an empty body leads to "internal error" being displayed as verification result.

Yannik

@lieser
Copy link
Owner

lieser commented Jan 30, 2023

Thanks a lot for reporting this.

Currently the addon expects the empty line that is separating the headers and the body to be there. And if not throws an internal error.

I took a closer look at the specification (https://www.rfc-editor.org/rfc/rfc5322#section-3.5) and noticed that the body is actually optional. So the current assumption that the empty line always has to be there is wrong.

I will fix this in the next version. But would be nice if you could confirm that the email causing the issue has a missing body, and not just an empty one.

@lieser lieser self-assigned this Jan 30, 2023
@lieser lieser added the bug label Jan 30, 2023
@lieser lieser added this to the 5.2.0 milestone Jan 30, 2023
@Yannik
Copy link
Author

Yannik commented Jan 31, 2023

Yes, I can indeed confirm that is the case. There is no linebreak after the headers.

lieser added a commit that referenced this issue Feb 28, 2023
- The body is only optional in the RFC so allow a missing one
- Ensure that the last header is still ending with a newline
- Ensure that all headers can be split into name and value
@lieser
Copy link
Owner

lieser commented Feb 28, 2023

The issue should be fixed now.

@lieser lieser closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants