Skip to content

Possible bug in URI::MailTo::EMAIL_REGEXP when parsing emails addresses containing two consecutive dots #177

@lucianghinda

Description

@lucianghinda

If the following email address is invalid:

thing..something.else@example.com

Then the URI::MailTo::EMAIL_REGEXP is allowing it, and it should not.

Example:

URI::MailTo::EMAIL_REGEXP.match?('thing..something.else@example.com') 

Should return false.

I interpret the section 3.41 from https://www.ietf.org/rfc/rfc5322.txt says:

If the string can be represented as a dot-atom (that is, it contains no
characters other than atext characters or "." surrounded by atext
characters),

That to me says that the part before @ can be formed by a string or a dot and a string, and since that string cannot be empty, that means there cannot be two consecutive dots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions