summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-validate_password.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-09-13 10:51:01 -0700
committerIvan Kohler <ivan@freeside.biz>2018-09-13 10:51:01 -0700
commit6383208b0f004ddcb26c74788595dce6673863f8 (patch)
tree98a9d8902e707bb63f25154fdf84d1b146fd2004 /httemplate/misc/xmlhttp-validate_password.html
parent24fcbda43464e5ee5a342a52f6c5780e12693402 (diff)
parentbc552f2fba7fd376a2f036a7dc02b58a48fa31b0 (diff)
Merge branch 'FREESIDE_4_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_4_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 4d9716bb9..c53abe883 100644
--- a/httemplate/misc/xmlhttp-validate_password.html
+++ b/httemplate/misc/xmlhttp-validate_password.html
@@ -28,14 +28,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);
}