Bug 10177 - whitespace is a valid password causing pernicious perturbations.

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 <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Brandon 2015-01-14 22:30:01 +00:00 committed by Tomas Cohen Arazi
parent 57d411dcd6
commit fe28561897
1 changed files with 5 additions and 0 deletions

View File

@ -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) {