Skip to content

Commit

Permalink
Simplified the logic by reusing EMAIL_BLACKLIST
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Mar 7, 2015
1 parent a6a0181 commit 29c35a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/jenkinsci/account/Application.java
Expand Up @@ -128,7 +128,7 @@ public HttpResponse doDoSignup(

// spam check
for (Answer a : new StopForumSpam().build().ip(ip).email(email).query()) {
if (a.isAppears() || email.equals("kk+spamtest@kohsuke.org") || email.toLowerCase(Locale.ENGLISH).contains("@yahoo.co.id")) {
if (a.isAppears()) {
return maybeSpammer(userid, firstName, lastName, email, ip, a);
}
}
Expand Down Expand Up @@ -456,6 +456,9 @@ public AdminUI getAdmin() {
private static final Pattern VALID_ID = Pattern.compile("[a-z0-9_]+");

public static final List<String> EMAIL_BLACKLIST = Arrays.asList(
"@mailnesia.com"
"@mailnesia.com",
"@yahoo.co.id",
"obat@",
"kk+spamtest@kohsuke.org"
);
}

0 comments on commit 29c35a8

Please sign in to comment.