Block userids make up of just sdfg in any order and just those characters.
ignore .idea folder
This commit is contained in:
parent
4235ee98e1
commit
5865c26b12
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@
|
||||
*.iws
|
||||
target
|
||||
config.properties
|
||||
bin/jetty-runner.jar
|
||||
bin/jetty-runner.jar
|
||||
.idea
|
@ -160,6 +160,10 @@ public class Application {
|
||||
return maybeSpammer(userid, firstName, lastName, email, ip, "Blacklist");
|
||||
}
|
||||
|
||||
if(badUserId(userid)) {
|
||||
return maybeSpammer(userid, firstName, lastName, email, ip, "badUserId");
|
||||
}
|
||||
|
||||
if(circuitBreaker.check()) {
|
||||
return maybeSpammer(userid, firstName, lastName, email, ip, "circuitBreaker");
|
||||
}
|
||||
@ -182,6 +186,10 @@ public class Application {
|
||||
return new HttpRedirect("doneMail");
|
||||
}
|
||||
|
||||
private boolean badUserId(String userid) {
|
||||
return Pattern.matches("^[sdfg]+$", userid.toLowerCase());
|
||||
}
|
||||
|
||||
private boolean verifyCaptcha(String uresponse, String ip) {
|
||||
String postParams = "secret=" + URLEncoder.encode(params.recaptchaPrivateKey()) +
|
||||
"&remoteip=" + URLEncoder.encode(ip) +
|
||||
@ -556,6 +564,7 @@ public class Application {
|
||||
public static final List<String> EMAIL_BLACKLIST = Arrays.asList(
|
||||
"@clrmail.com",
|
||||
"@guerrillamail.com",
|
||||
"@mailcatch.com",
|
||||
"@maildx.com",
|
||||
"@mailinator.com",
|
||||
"@mailnesia.com",
|
||||
|
Loading…
Reference in New Issue
Block a user