summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-validate_password.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-09-13 10:54:53 -0700
committerIvan Kohler <ivan@freeside.biz>2018-09-13 10:54:53 -0700
commitd7b4beaeb975c55f5203aef275c7c01853fa51f2 (patch)
tree2eb0a708bfbfdbfaa3c6db935911a8fd830446d4 /httemplate/misc/xmlhttp-validate_password.html
parent2c0ab6236b187a39fbb6e2046180e2531a391333 (diff)
parent4cf578816f5a491b1f66ddb5a9e832457ebe1332 (diff)
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'httemplate/misc/xmlhttp-validate_password.html')
-rw-r--r--httemplate/misc/xmlhttp-validate_password.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/misc/xmlhttp-validate_password.html b/httemplate/misc/xmlhttp-validate_password.html
index b340170f8..95f1fd33c 100644
--- a/httemplate/misc/xmlhttp-validate_password.html
+++ b/httemplate/misc/xmlhttp-validate_password.html
@@ -29,14 +29,14 @@ my $validate_password = sub {
$result{'syserror'} = 'Invoked without password' unless $password;
return \%result if $result{'syserror'};
- if ($arg{'contactnum'}) {
+ if ($arg{'contactnum'} =~ /^\d+$/) {
my $contactnum = $arg{'contactnum'};
$result{'syserror'} = 'Invalid contactnum' unless $contactnum =~ /^\d*$/;
return \%result if $result{'syserror'};
my $contact = $contactnum
? qsearchs('contact',{'contactnum' => $contactnum})
- : '';
+ : (new FS::contact {});
$result{'error'} = $contact->is_password_allowed($password);
}