Merge pull request #92 from larrys/master

Removal of bad name checks.
This commit is contained in:
R. Tyler Croy 2016-03-28 07:57:28 -07:00
commit 47a4bf2da0

View File

@ -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);