[password-resets] Make sure the min/max allowed chars is reflected on the description. Also fix up the detection of sp



commit 352e8053c5c88c03d65e9e20a84d587dd8d768af
Author: Andrea Veri <averi redhat com>
Date:   Wed Sep 1 17:30:37 2021 +0200

    Make sure the min/max allowed chars is reflected on the description. Also fix up the detection of special 
chars

 static/js/password-strength.js | 4 ++--
 templates/form-reset.html      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/static/js/password-strength.js b/static/js/password-strength.js
index c641664..07d3ef6 100644
--- a/static/js/password-strength.js
+++ b/static/js/password-strength.js
@@ -50,7 +50,7 @@ jQuery(() => {
 
     hasNumbers = /\d/.test(inputValue);
 
-    hasSpecials = /^[\w!@#$%^*()_+\-=\[\]{};\\|,.<>\/?]+$/.test(inputValue);
+    hasSpecials = /[` !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(inputValue);
 
     if (hasMinLength && hasUppercase && hasNumbers && hasSpecials) {
       jQuery(this).addClass('valid').removeClass('invalid');
@@ -91,4 +91,4 @@ jQuery(() => {
       $passwordAlert.hide();
     }
   });
-});
\ No newline at end of file
+});
diff --git a/templates/form-reset.html b/templates/form-reset.html
index 8414b1a..23b7797 100644
--- a/templates/form-reset.html
+++ b/templates/form-reset.html
@@ -46,7 +46,7 @@
                            id="password"
                            name="password"
                            pattern="[a-zA-Z0-9!@#$%^*()_+\-=\[\]{};':\\|,.<>\/?]{8,48}"
-                           title="7 to 24 letters with special characters, numbers and uppercase letters"
+                           title="8 to 48 letters with special characters, numbers and uppercase letters"
                            class="form-control form-control-lg validate"
                            placeholder="Your new GNOME Account password..."
                            required=""/>
@@ -101,4 +101,4 @@
 <script type="text/javascript" src="https://static.gnome.org/js/deneb.min.js";></script>
 <script type="text/javascript" src="/static/js/password-strength.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]