RohanNagar / jmail

A modern and lightweight library for working with email addresses in Java
https://www.rohannagar.com/jmail
MIT License
131 stars 6 forks source link

E-Mail address with local part containing CONTROL characters should be invalid #236

Closed PascalSchumacher closed 5 months ago

PascalSchumacher commented 6 months ago

Is this bug report about an incorrectly validated email address?

If yes, what is the email address? firstname_lastname\u0011@server.org

I maybe wrong but I think that RFC 822 disallows control characters in email addresses. Do newer RFCs allow them?

Sorry for using an issue for a question and thank you very much for providing JMail!

RohanNagar commented 6 months ago

Hey @PascalSchumacher! Thanks for the question - please feel free to ask questions on issues, it helps me know that people are still using JMail!

As for this specific question, it's a good one. I'll need some time to look into it as it's been a while since I've looked through the RFCs. I know that non-whitespace controls are allowed in quotes, but I'm not 100% sure on if they are allowed unquoted. I'm out of town for a couple of weeks but I will let you know once I get a chance to look further!

RohanNagar commented 5 months ago

Hi @PascalSchumacher thanks again for this issue, it is a great catch. After reading through the relevant RFCs it does indeed look like control characters are not allowed unquoted. I will work on the fix for this asap.

PascalSchumacher commented 5 months ago

Thank you very much! 😄 Looking forward to a release with a fix for this.

RohanNagar commented 5 months ago

v1.6.3 is published with the fix! Thanks for your patience!