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

EMailValidator: Addresses with leading spaces must not be accepted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7
    • Routines
    • None

    Description

      @Test
      public void testEmailValidatorBug() {
      // The commons validator class accepts an address with an leading whitespace which seams to be a bug.
      boolean shouldBe = false;
      boolean isActual = true;
      String eMail = " user@foo.com";
      logger.debug("{} is {}", eMail, validator.isValid(eMail) ? "valid" : "invalid");
      assertThat("Check failed for " + eMail, validator.isValid(eMail), is(isActual));
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mehrcurry Guido Zockoll
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: