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 Hunt: valid IPv6 domain literals in email addresses fail validation #288

Closed
wants to merge 1 commit into from

Conversation

andris9
Copy link

@andris9 andris9 commented Apr 24, 2014

Validating e-mail addresses is a compromise between all the various RFCs and real world, so I do not mind if you disregard this as not a bug.

RFC5321 defines domain literals that can be used instead of hostnames in the e-mail address. While you seem to pass IPv4 addresses in the form of user@[127.0.0.1], joi does not recognize IPv6 format which is a bit different, namely user@[IPv6:zzz] where zzz is a valid IPv6 address, using either full or compact syntax.

Output for validating such address:

{ [Error: value must be a valid email]
  details: 
   [ { message: 'value must be a valid email',
       path: 'value',
       type: 'string.email' } ],
  _object: 'van@[IPv6:2a00:1450:4001:c02::1b]',
  annotate: [Function] }

@hueniverse hueniverse added the bug label May 22, 2014
@hueniverse hueniverse added this to the 4.3.0 milestone May 22, 2014
@hueniverse hueniverse self-assigned this May 22, 2014
@hueniverse
Copy link
Contributor

Thanks for the report. This was fixed via an earlier bug hunt report which clearly showed just how sad our previous email regex was. Because the code we had was so poorly done for email verification, I just replaced the whole thing with another module which should clear all these other email bug reports.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants