Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-315

Email validator does not properly validate symbolic domain names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0 Release
    • 1.4.1 Release
    • None
    • None

    Description

      This returns true:

      EmailValidator.getInstance().isValid("me@at&t.net")

      ...when IMO it should not. If the portion of the address after the @ is symbolic, then it should be validated like a host name which may only contain [A-Za-z0-9-\.] and has a few other requirements as well (no leading or trailing hyphen or empty 'label', max 63 characters per label, max 255 characters total length).

      I'm less interested in the limits, etc. but an '&' is not valid in a hostname and it would be nice to fail under those conditions. Use of IDN should pretty much allow any letter or number (\p

      {Alnum}

      ).

      Attachments

        Activity

          People

            Unassigned Unassigned
            chris@christopherschultz.net Christopher Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: