From 49ad2ff035625607850afac374180f2f510e89d6 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Mon, 5 Feb 2018 08:25:03 +0000 Subject: [PATCH] Bug 18908: Do not use .optional in password match validation function Test plan: 0) Aplly only first patch 1) You will be able to submit a from on member-password.pl even if the passwords don't match 2) Apply this patch -> you can't be able to submit the form if the paswords don't match, but you'll be able to submit the form when password fields are blank https://bugs.koha-community.org/show_bug.cgi?id=19908 Signed-off-by: Roch D'Amour Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc index eb730e67ed..346929efdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc @@ -19,7 +19,7 @@ }, _("Password contains leading and/or trailing spaces")); jQuery.validator.addMethod("password_match", function(value, element){ var new_password_node = $("input[name='" + new_password_node_name + "']:first"); - return this.optional(element) || value == $(new_password_node).val(); + return value == $(new_password_node).val(); }, _("Please enter the same password as above")); [% END %] -- 2.14.1