]> source.dussan.org Git - vaadin-framework.git/commitdiff
Adding regression test against malicious input (#12105)
authorTatu Lund <tatu@vaadin.com>
Fri, 25 Sep 2020 12:35:32 +0000 (15:35 +0300)
committerGitHub <noreply@github.com>
Fri, 25 Sep 2020 12:35:32 +0000 (15:35 +0300)
server/src/test/java/com/vaadin/data/validator/EmailValidatorTest.java

index b71ccf541bca76686a0e4fe66da108e928335af3..a9a78d469f08a912423478ecec23018d4b4fe0bd 100644 (file)
@@ -68,6 +68,11 @@ public class EmailValidatorTest extends ValidatorTestBase {
                 validator("one-letter tld not allowed"));
     }
 
+    @Test
+    public void testEmailValidatorWithBadInput() {
+        assertFails("a@a.m5qRt8zLxQG4mMeu9yKZm5qRt8zLxQG4mMeu9yKZm5qRt8zLxQG4mMeu9yKZ&",validator("validator not halting on bad input"));
+    }
+
     @Test
     public void testLongTldPasses() {
         assertPasses("joonas@vaadin.management", shouldNotFail());