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

EMailValidator: Addresses with leading spaces must not be accepted

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7
    • Component/s: Routines
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: