Bug 235158

Summary: report error when clone a cert whose component = "Component/Peripheral"
Product: [Retired] Red Hat Ready Certification Tests Reporter: heyinglong <nobody+yhe>
Component: web siteAssignee: XINSUN <xisun>
Status: CLOSED CURRENTRELEASE QA Contact: Yu Shao <yshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: bxu, rlandry, xiqin, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: (2.18rh) 2008/05/23 push Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-23 07:43:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 238457    
Attachments:
Description Flags
Pls review. none

Description heyinglong 2007-04-04 03:41:54 UTC
Description of problem:
will report following error when clone a cert whose component =
"Component/Peripheral":
Insecure dependency in parameter 1 of DBI::db=HASH(0x15e2bd0)->prepare
method call while running with -T switch at hwcert.pl line 498.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Choose a component = "Component/Peripheral" cert
2. click "Create Clone"
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rob Landry 2008-05-13 16:11:10 UTC
This may no longer be an issue after the DB change, will leave open to
investigate/fix.

Comment 2 XINSUN 2008-05-14 13:07:03 UTC
Created attachment 305355 [details]
Pls review.

The bug is caused by the below codes:

my $cert_type = $::FORM{'internal_whiteboard'};
.......
y $status = "Compatible";
if ($cert_type ne "Component/Peripheral") {
    $cert_type = "SYSTEM";
    $status = "Certified";
} else {
    # Find the test type (AUDIO/NETWORK/STORAGE/etc) and use that as cert_type
    # This should just work if each of the uploaded packages are similar in
tests and
    # the test ran besides INFO is the type of component being tested.
    foreach my $i (keys %tests) {
	foreach my $type (keys %{$tests{$i}}) {
	    next if $type eq 'INFO';
	    $cert_type = $type;
	}
    }
}

my $cert_id = CreateCertRecord($id, $cert_type, "false", $status, "now()");


When the $cert_type eq "Component/Peripheral", $cert_type needs to be taint
before insert it into db.

Best Regards!
Nicho

Comment 3 Rob Landry 2008-05-16 15:55:55 UTC
if this tests cleanly, please check-in

Comment 4 XINSUN 2008-05-16 16:52:09 UTC
Have tested well, have checked into cvs.
Nicho