From fe285618972dde88e2aada5dd41d03d17aaedab5 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 14 Jan 2015 22:30:01 +0000 Subject: [PATCH] Bug 10177 - whitespace is a valid password causing pernicious perturbations. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test plan: Go to your patron, go to change username and/or password. change password to whitespace, notice it is accepted, apply this patch, change password again, to whitespace, notice password is not valid. Followed test plan. Patch behaves as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/members/member-password.tt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index 96544e0e7d..6d27ad3cda 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -9,7 +9,12 @@ alert(_("Passwords do not match")); return false; } else { + if ($("input[name='newpassword']").val().match(/^\s*$/)) { + alert(_("Password contains nothing except whitespace")); + return false; + } else { return true; +} } }); $("body").on('click', "#fillrandom",function(e) { -- 2.39.5