]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/PasswordStrengthChecker.java
Fix minor bug in strength checker and add unit test.
[gigi.git] / src / org / cacert / gigi / util / PasswordStrengthChecker.java
index efc776ef08da4836d2c30701966b87463a38c776..07898f263b681715f141d5405ce236bf4d07efd5 100644 (file)
@@ -9,7 +9,7 @@ public class PasswordStrengthChecker {
        static Pattern lower = Pattern.compile("[a-z]");
        static Pattern upper = Pattern.compile("[A-Z]");
        static Pattern whitespace = Pattern.compile("\\s");
-       static Pattern special = Pattern.compile("\\W");
+       static Pattern special = Pattern.compile("(?!\\s)\\W");
        private PasswordStrengthChecker() {
        }
        private static int checkpwlight(String pw) {