From dc7f828e13553491ed9f6e3a231bbdbc798f8347 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Mon, 25 Jul 2016 15:48:53 -0400 Subject: [PATCH] Remove + as a valid char in emails --- src/main/java/net/frozenorb/apiv3/util/EmailUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/util/EmailUtils.java b/src/main/java/net/frozenorb/apiv3/util/EmailUtils.java index 6d4aee1..940c828 100644 --- a/src/main/java/net/frozenorb/apiv3/util/EmailUtils.java +++ b/src/main/java/net/frozenorb/apiv3/util/EmailUtils.java @@ -14,7 +14,8 @@ import java.util.regex.Pattern; public class EmailUtils { private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile( - "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", + // this pattern is a slight modification (remove + as a valid char due to 'duplicate emails') of the standard one + "^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE ); private static final HttpClient httpsClient = APIv3.getVertxInstance().createHttpClient(new HttpClientOptions().setSsl(true).setTrustAll(true));