Bug 235158 - report error when clone a cert whose component = "Component/Peripheral"
Summary: report error when clone a cert whose component = "Component/Peripheral"
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ready Certification Tests
Classification: Retired
Component: web site   
(Show other bugs)
Version: 1.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: XINSUN
QA Contact: Yu Shao
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 238457
TreeView+ depends on / blocked
 
Reported: 2007-04-04 03:41 UTC by heyinglong
Modified: 2008-06-23 07:43 UTC (History)
5 users (show)

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: ---


Attachments (Terms of Use)
Pls review. (455 bytes, patch)
2008-05-14 13:07 UTC, XINSUN
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.