diff --git a/browserid/static/dialog/controllers/createaccount_controller.js b/browserid/static/dialog/controllers/createaccount_controller.js index 50ba5cdb0fae1d0970bfc8268b273cc0ec714388..67e5d9b56b171588b9e9ad93c251bf4dee5dde77 100644 --- a/browserid/static/dialog/controllers/createaccount_controller.js +++ b/browserid/static/dialog/controllers/createaccount_controller.js @@ -146,8 +146,10 @@ } else { if (!pass) { self.find('#enter_a_password').show(); - } else if (pass.length < 5) { + } else if (pass.length < 8) { self.find('#password_too_short').show(); + } else if (pass.length > 80) { + self.find('#password_too_long').show(); } else { self.find('#password_ok').show(); $('#create_continue').removeClass('disabled'); diff --git a/browserid/static/dialog/controllers/forgotpassword_controller.js b/browserid/static/dialog/controllers/forgotpassword_controller.js index e7037030ce96854af915f047ec94bf82168bfc05..0726de3b9415b667ab6375fb392445fc504007c4 100644 --- a/browserid/static/dialog/controllers/forgotpassword_controller.js +++ b/browserid/static/dialog/controllers/forgotpassword_controller.js @@ -63,8 +63,10 @@ } else { if (!pass) { self.find("#enter_a_password").show(); - } else if (pass.length < 5) { + } else if (pass.length < 8) { self.find("#password_too_short").show(); + } else if (pass.length > 80) { + self.find("#password_too_long").show(); } else { self.find("#password_ok").show(); $("#create_continue").removeClass("disabled"); diff --git a/browserid/static/dialog/views/create.ejs b/browserid/static/dialog/views/create.ejs index 16b4c58849199d9a779542e5caadc38013c22d37..14b29914bd5ea3ce94b4b171b61394eca4f71931 100644 --- a/browserid/static/dialog/views/create.ejs +++ b/browserid/static/dialog/views/create.ejs @@ -17,6 +17,7 @@ <span class="note passwordnote" id="enter_a_password"><span class="bad">Enter a password</span></span> <span class="note passwordnote" id="passwords_different" style="display:none;"><span class="bad">Passwords different</span></span> <span class="note passwordnote" id="password_too_short" style="display:none;"><span class="bad">Password too short</span></span> + <span class="note passwordnote" id="password_too_long" style="display:none;"><span class="bad">Password too long</span></span> <span class="note passwordnote" id="password_ok" style="display:none;"><span class="good">Password OK</span></span> </div> <div class="attention_lame" style="display:none;" id="emailinuse_message"> diff --git a/browserid/static/dialog/views/forgotpassword.ejs b/browserid/static/dialog/views/forgotpassword.ejs index 9a038b93d5220d81c01a6db54a4f05cdfb2e625b..d9d7948b3197143e22dd0086cded056004350c59 100644 --- a/browserid/static/dialog/views/forgotpassword.ejs +++ b/browserid/static/dialog/views/forgotpassword.ejs @@ -15,6 +15,7 @@ <span class="note passwordnote" id="enter_a_password"><span class="bad">Enter a password</span></span> <span class="note passwordnote" id="passwords_different" style="display:none;"><span class="bad">Passwords different</span></span> <span class="note passwordnote" id="password_too_short" style="display:none;"><span class="bad">Password too short</span></span> + <span class="note passwordnote" id="password_too_long" style="display:none;"><span class="bad">Password too long</span></span> <span class="note passwordnote" id="password_ok" style="display:none;"><span class="good">Password OK</span></span> </div> <div class="attention_lame" style="display:none;" id="emailinuse_message">