]> WPIA git - gigi.git/commitdiff
chg: improve information about password strength
authorINOPIAE <m.maengel@inopiae.de>
Wed, 11 Oct 2017 06:29:26 +0000 (08:29 +0200)
committerFelix Dörre <felix@dogcraft.de>
Fri, 10 Nov 2017 06:40:13 +0000 (07:40 +0100)
Change-Id: Ib9ef93fd4961df8bbc6bd667af8d1e0b5f49d602

src/club/wpia/gigi/pages/PasswordResetForm.templ
src/club/wpia/gigi/pages/account/ChangePasswordForm.templ
src/club/wpia/gigi/pages/main/RegisterPage.templ
src/club/wpia/gigi/pages/main/Signup.java
src/club/wpia/gigi/pages/main/Signup.templ
src/club/wpia/gigi/util/PasswordStrengthChecker.java

index b4ac1e9207901fa786135d84e941219f6c0f32bb..a0e46a4f347ed372854542ffc6178ff3779ce6bc 100644 (file)
@@ -18,7 +18,7 @@
     <td><input type="password" name="pword2" required></td>
   </tr>
   <tr>
-    <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
+    <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. For the current requirements and to learn more, visit our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" name="process" value="<?=_Update Pass Phrase?>"></td>
index c77f7434dad1ae05bf6b5f9b95f202fb007e9cff..0fd8f76a88069bcd91aeb136b051cdedc7bd8d6d 100644 (file)
@@ -18,7 +18,7 @@
     <td><input class="form-control" type="password" name="pword2" required></td>
   </tr>
   <tr>
-    <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
+    <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. For the current requirements and to learn more, visit our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" name="process" value="<?=_Update Pass Phrase?>"></td>
index 2cfc332965bd4fa2859723f9d2f05c2621a00186..29c8219e7a19cecb2848b80994d98b46b28b62e4 100644 (file)
@@ -6,5 +6,5 @@
 <?=_Your private information will be used for internal procedures only and will not be shared with third parties.?>
 </p>
 <p style="border:dotted 1px #900;padding:0.3em;background-color:#ffe;">
-<?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?>
+<?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. For the current requirements and to learn more, visit our !(/wiki/goodPassword)FAQ!'</a>'.?>
 </p>
index 746fd803a6bee2790cd6f37c2ac4070ee8a47fde..07d7f9126cf93606e0e88668b3327f93b6ee2f07 100644 (file)
@@ -139,7 +139,7 @@ public class Signup extends Form {
         }
         int pwpoints = PasswordStrengthChecker.checkpw(pw1, ni.getNamePartsPlain(), email);
         if (pwpoints < 3) {
-            ga.mergeInto(new GigiApiException("The Pass Phrase you submitted failed to contain enough" + " differing characters and/or contained words from" + " your name and/or email address."));
+            ga.mergeInto(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 and to learn more, visit our {0}FAQ{1}.", Arrays.asList("!(/wiki/goodPassword", "!'</a>'"))));
         }
         if ( !ga.isEmpty()) {
             throw ga;
index a6ae2b1bbda16ae3ae073adb7be7b36f5faf94b4..466eaaa31339c765d72545d5bfa884599c2501f4 100644 (file)
@@ -43,7 +43,7 @@
   </tr>
 
   <tr>
-    <td colspan="3"><font color="red">*</font><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
+    <td colspan="3"><font color="red">*</font><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. For the current requirements and to learn more, visit our !(/wiki/goodPassword)FAQ!'</a>'.?></td>
   </tr>
   <tr>
     <td colspan="3"><?=_It's possible to get notifications of up and coming events and even just general announcements, untick any notifications you don't wish to receive. For country, regional and radius notifications to work you must choose your location once you've verified your account and logged in.?></td>
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>'"))));
         }
     }