From cf1dc0b1bcd75da9f5594f45dd39b9e4feefa891 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 31 Jan 2016 12:50:57 -0800 Subject: custom_userhistory: cleanup args. Signed-off-by: Robin H. Johnson --- custom_userhistory.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'custom_userhistory.cgi') diff --git a/custom_userhistory.cgi b/custom_userhistory.cgi index ba9054d81..d7e9a8549 100755 --- a/custom_userhistory.cgi +++ b/custom_userhistory.cgi @@ -14,19 +14,19 @@ my $vars = {}; my $myuser = Bugzilla->login(LOGIN_REQUIRED); my $dbh = Bugzilla->switch_to_shadow_db(); my @bindValues; -my $query; +my ($query, $matchstr, $userid, $limit); print $cgi->header(); -my $matchstr = $cgi->param('matchstr'); -my $userid = $cgi->param('userid'); +$matchstr = $cgi->param('matchstr'); +$userid = $cgi->param('userid'); if(!defined($matchstr) and !defined($userid)) { print "No search parameters specified!
"; exit(0); } exit 0 if !defined($matchstr) and !defined($userid); -my $limit = $cgi->param('limit'); +$limit = $cgi->param('limit'); $limit = 50 unless defined($limit) and $limit =~ /^\d+$/; trick_taint($matchstr) if defined($matchstr); @@ -34,7 +34,7 @@ trick_taint($userid) if defined($userid); trick_taint($limit); $userid = $matchstr ? login_to_id($matchstr) : $userid; -my $login_name = $matchstr ? $matchstr : Bugzilla::User->new($matchstr)->login; +$login_name = $matchstr ? $matchstr : Bugzilla::User->new($userid)->login; if(!$userid || !$login_name) { print "Bad user!
"; -- cgit v1.2.3-65-gdbad