You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//! 2. Should only use characters from set [a-zA-z0-9_]
33
+
// * rule 2) Should only use characters from set [a-zA-z0-9_]
34
34
charactersValid = username.matches(REGEX);
35
35
if(!charactersValid)
36
-
AppUtils.print(AppUtils.ANSI_RED + "!! Warning: " + AppUtils.ANSI_RESET + "Invalid characters in username, can only have letters [a-z, A-Z], numbers [0-9], and underscore [_].");
36
+
PrintUtils.println(PrintUtils.ANSI_RED + "!! Warning: " + PrintUtils.ANSI_RESET + "Invalid characters in username, can only have letters [a-z, A-Z], numbers [0-9], and underscore [_].");
37
37
38
38
39
-
// ! 3. No swear words
39
+
// * rule 3-4) No swear words, nor should users bypass with leetspeak
40
40
ProfanityFilter.initialise();
41
41
42
-
// ! 4. Should not be able to bypass rule 3 by substituting numbers for letters
AppUtils.println(AppUtils.ANSI_RED + "!! Warning: Password too short! Please create a password of at least 8 characters or more" + AppUtils.ANSI_RESET);
64
+
PrintUtils.println(PrintUtils.ANSI_RED + "!! Warning: Password too short! Please create a password of at least 8 characters or more" + PrintUtils.ANSI_RESET);
65
65
returnfalse;
66
66
}
67
67
68
68
// validate the maximum length of the password
69
69
if(pwd.length > MAX_PASSWORD_LENGTH) {
70
-
AppUtils.println(AppUtils.ANSI_RED + "!! Warning: Password too long!" + AppUtils.ANSI_RESET);
70
+
PrintUtils.println(PrintUtils.ANSI_RED + "!! Warning: Password too long!" + PrintUtils.ANSI_RESET);
0 commit comments