Removal of bad name checks.
This commit is contained in:
parent
d191247e3b
commit
6d2841acfa
@ -220,18 +220,6 @@ public class Application {
|
||||
}
|
||||
}
|
||||
|
||||
if(badNameElement(usedFor)) {
|
||||
blockReasons.add("Garbled use");
|
||||
}
|
||||
|
||||
if(userid.equalsIgnoreCase(usedFor) || firstName.equalsIgnoreCase(usedFor) || lastName.equalsIgnoreCase(usedFor) || email.equalsIgnoreCase(usedFor)) {
|
||||
blockReasons.add("Use same as name");
|
||||
}
|
||||
|
||||
if(badNameElement(userid) || badNameElement(firstName) || badNameElement(lastName)) {
|
||||
blockReasons.add("Bad name element");
|
||||
}
|
||||
|
||||
if(checkCookie(request, ALREADY_SIGNED_UP)) {
|
||||
blockReasons.add("Cookie");
|
||||
}
|
||||
@ -300,10 +288,6 @@ public class Application {
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private boolean badNameElement(String userid) {
|
||||
return Pattern.matches("^[sdfghrtbvd0-9]{2,}$", userid.toLowerCase());
|
||||
}
|
||||
|
||||
public String geoIp(String ip) {
|
||||
try {
|
||||
URL url = new URL("http://freegeoip.net/csv/" + ip);
|
||||
|
Loading…
Reference in New Issue
Block a user