#!/usr/bin/perl use strict; #use warnings; use QualysVulnQA; print ""; print '
'; print "Content-Type: text/html\n\n"; print '
';
print '';
print "";
print "";
my $tankdbh = QualysVulnQA::bugsopen();
my $request_method = $ENV{'REQUEST_METHOD'};
my $query_string = $ENV{'QUERY_STRING'};
my $path_info = $ENV{'PATH_INFO'};
my $content_length = $ENV{'CONTENT_LENGTH'};
# Parse web content
my %webin;
my @pairs = split(/&/, $query_string);
print @pairs;
foreach my $pair (@pairs) {
(my $name, my $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/^M//g;
$value =~ s/~!/ ~!/g;
$webin{$name} = $value;
}
my $Name= $webin{"qaname"};
my $bug = $webin{"bug_id"};
my $new = "select bug_id as Bug_Number,short_desc as Bug_Summary from bugs,profiles where (bugs.qa_contact=profiles.userid) and product_id = 19 and component_id = 271 and bug_status='$bug' and profiles.realname='$Name'";
my $results = QualysVulnQA::generic_db_query($tankdbh,$new);
#print $result;
#my $status;
#SWITCH: {
# $status = "NEW", last SWITCH if ($bug == 'NEW');
# $status = "ASSIGNED", last SWITCH if ($bug == 'ASSIGNED');
# $status = "RESOLVED", last SWITCH if ($bug == 'RESOLVED');
# $status = "VERIFIED", last SWITCH if ($bug == 'VERIFIED');
# $status = "CLOSED", last SWITCH if ($bug == 'CLOSED');
# }
# Output to browser
print STDOUT "\n";
#print STDOUT "| Bug_Number | Bug_Summary |
|---|---|
| $bug | $Bug_Summary |