]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/util/PasswordStrengthChecker.java
chg: improve information about password strength
[gigi.git] / src / club / wpia / gigi / util / PasswordStrengthChecker.java
index 21aa533ff5648a27c789688ea131c71fecf5e4da..39a8580d393aa65bf53698292567f3a56142efc8 100644 (file)
@@ -1,11 +1,13 @@
 package club.wpia.gigi.util;
 
+import java.util.Arrays;
 import java.util.TreeSet;
 import java.util.regex.Pattern;
 
 import club.wpia.gigi.GigiApiException;
 import club.wpia.gigi.dbObjects.Name;
 import club.wpia.gigi.dbObjects.NamePart;
+import club.wpia.gigi.output.template.SprintfCommand;
 
 public class PasswordStrengthChecker {
 
@@ -78,7 +80,7 @@ public class PasswordStrengthChecker {
             }
         }
         if (checkpw(pw, parts.toArray(new String[parts.size()]), email) < 3) {
-            throw new GigiApiException("The Pass Phrase you submitted failed to contain enough" + " differing characters and/or contained words from" + " your name and/or email address.");
+            throw (new GigiApiException(new SprintfCommand("The Pass Phrase you submitted failed to contain enough differing characters and/or contained words from your name and/or email address. For the current requirements, visit our {0}FAQ{1}.", Arrays.asList("!(/wiki/goodPassword", "!'</a>'"))));
         }
     }