Code Monkey home page Code Monkey logo

Comments (6)

karlwilbur avatar karlwilbur commented on September 13, 2024

Yeah, I see what you are saying. International Domain Names (IDN), when ASCII-Compatible Encoded (ACE), are getting double dashes in them. I think that is why they are getting rejected in strict mode.

from email_validator.

karlwilbur avatar karlwilbur commented on September 13, 2024

https://github.com/K-and-R/email_validator/blob/develop/lib/email_validator.rb#L126-L128

I expected GitHub this to include the lines of code (below) just by adding in the link to them (above). It did not, so here they are:

    def label_contains_no_more_than_one_consecutive_hyphen
      '(?!.*?--.*$)'
    end

from email_validator.

karlwilbur avatar karlwilbur commented on September 13, 2024

So, this behavior is very much intentional, but may be a mistake. Let me look at the RFC again.

from email_validator.

karlwilbur avatar karlwilbur commented on September 13, 2024

So, I am thinking that rejecting consecutive hyphens was my mistake. I cannot see where they are not allowed in domain names.

I do see that India's Domain Registration Service does say that:

Two hyphens together is usually not permitted and also hyphens cannot appear at both third and fourth positions.

In fact, RFC 3696 clearly indicates that double hyphens preceded by "xn" should be expected.
(https://www.rfc-editor.org/rfc/rfc3696#section-5)

So, definitely a bug.

Thank you for bringing it to my attention.

from email_validator.

karlwilbur avatar karlwilbur commented on September 13, 2024

@manuelmeurer Fixed in version 2.2.4

from email_validator.

manuelmeurer avatar manuelmeurer commented on September 13, 2024

Brilliant, thanks so much for the quick fix! ❤️

from email_validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.