Show useful info about params

This commit is contained in:
Jamie Cameron
2021-08-05 13:15:42 -07:00
parent 58b5844765
commit a87791e479

View File

@ -8,6 +8,7 @@ require './passwd-lib.pl';
print "Content-type: text/plain\n\n"; print "Content-type: text/plain\n\n";
# Validate inputs # Validate inputs
keys(%in) || &error_exit("Required parameters are 'user' (Unix username), 'old' (Old password) and 'new' (New password)");
my $err = &apply_rate_limit($ENV{'REMOTE_ADDR'}); my $err = &apply_rate_limit($ENV{'REMOTE_ADDR'});
&error_exit($err) if ($err); &error_exit($err) if ($err);
$in{'user'} || &error_exit("Missing user parameter"); $in{'user'} || &error_exit("Missing user parameter");