From: Kirill Miazine Date: Sun, 2 Jul 2017 13:04:16 +0000 (+0200) Subject: Use q->multi_param() when multiple values are expected. X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/c3d636dd3b8d9ae344f85b33032f87b5592b5a47 Use q->multi_param() when multiple values are expected. --- diff --git a/cgi-bin/show_failures.pl b/cgi-bin/show_failures.pl index 62d186e..ffdcef9 100755 --- a/cgi-bin/show_failures.pl +++ b/cgi-bin/show_failures.pl @@ -19,12 +19,12 @@ use FindBin qw($RealBin); require "$RealBin/../BuildFarmWeb.pl"; my $query = new CGI; -my @members = grep {$_ ne "" } $query->param('member'); +my @members = grep {$_ ne "" } $query->multi_param('member'); map { s/[^a-zA-Z0-9_ -]//g; } @members; my $max_days = $query->param('max_days') + 0 || 10; -my @branches = grep {$_ ne "" } $query->param('branch'); +my @branches = grep {$_ ne "" } $query->multi_param('branch'); map { s/[^a-zA-Z0-9_ .-]//g; } @branches; -my @stages = grep {$_ ne "" } $query->param('stage'); +my @stages = grep {$_ ne "" } $query->multi_param('stage'); map { s/[^a-zA-Z0-9_ :-]//g; } @stages; my $dsn="dbi:Pg:dbname=$dbname"; diff --git a/cgi-bin/show_status.pl b/cgi-bin/show_status.pl index 6bc9fc6..d14644c 100755 --- a/cgi-bin/show_status.pl +++ b/cgi-bin/show_status.pl @@ -19,7 +19,7 @@ use FindBin qw($RealBin); require "$RealBin/../BuildFarmWeb.pl"; my $query = new CGI; -my @members = $query->param('member'); +my @members = $query->multi_param('member'); map { s/[^a-zA-Z0-9_ -]//g; } @members; my $dsn="dbi:Pg:dbname=$dbname";