From 6d2841acfa94b70bdbb7741eecfcdc51e5df3ab6 Mon Sep 17 00:00:00 2001 From: "Larry Shatzer, Jr" Date: Mon, 28 Mar 2016 07:15:12 -0600 Subject: [PATCH] Removal of bad name checks. --- .../java/org/jenkinsci/account/Application.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/java/org/jenkinsci/account/Application.java b/src/main/java/org/jenkinsci/account/Application.java index 69f4629..c2d0888 100644 --- a/src/main/java/org/jenkinsci/account/Application.java +++ b/src/main/java/org/jenkinsci/account/Application.java @@ -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);