Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312278 Details for
Bug 453613
FEAT: md5sum check should have an override for attaching packages
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
a patch fix the comment#7
bug453613-comment#7.patch (text/plain), 3.04 KB, created by
eric_liu
on 2008-07-21 16:23:32 UTC
(
hide
)
Description:
a patch fix the comment#7
Filename:
MIME Type:
Creator:
eric_liu
Created:
2008-07-21 16:23:32 UTC
Size:
3.04 KB
patch
obsolete
>Index: attachment.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/attachment.cgi,v >retrieving revision 1.16 >diff -u -r1.16 attachment.cgi >--- attachment.cgi 21 Jul 2008 06:17:04 -0000 1.16 >+++ attachment.cgi 21 Jul 2008 16:16:04 -0000 >@@ -393,10 +393,8 @@ > > sub validateMd5sumOverride > { >- # Verify that the $md5sumOverride is legal either way and that the user >- # has permissions to set it , since the UI uses >- # an HTML checkbox to represent this flag, and unchecked HTML checkboxes >- # do not get sent in HTML requests. >+ trick_taint($::FORM{'md5sumoverride'}); >+ $::FORM{'md5sumoverride'} = $::FORM{'md5sumoverride'} ? 1 : 0; > UserInGroup('hwcert_edit') || > ThrowUserError("md5sum_override_permission_deny"); > } >@@ -951,36 +949,23 @@ > sub insert > { > my ($data) = shift @_; >- my $md5sumOverride = (shift @_) ? 1: 0; > my $isprivact = $::FORM{'isprivate'} ? 1 : 0; >- my $md5sum = GenMd5File($filename, $data); >- my @row; >- my $attach_id; >- my $bug_id; >+ my $md5sum = $::FORM{'md5sumoverride'} ? 1 : 0; > my $duplicate_package_comment; > >- SendSQL2("SELECT filename FROM cert_rpms WHERE md5sum = " . SqlQuote($md5sum)); >- >- if($md5sumOverride){ >- my $attach_bugs_query = "SELECT attach_id, bug_id >- FROM cert_records JOIN cert_rpms >- ON cert_records.id = cert_rpms.cert_id >- WHERE md5sum = ". >- SqlQuote($md5sum); >- my $dbh_hwcert = Bugzilla->dbh2; >- my $sth_hwcert = $dbh_hwcert->prepare($attach_bugs_query); >- $duplicate_package_comment .= "DUPLICATE ATTACHMENTS Existing : \n\n"; >- $sth_hwcert->execute(); >- while ( @row = $sth_hwcert->fetchrow_array()){ # one row one time >- $attach_id = shift @row; >- $bug_id = shift @row; >- $duplicate_package_comment .= "attachment $attach_id in bug $bug_id \n"; >- } >- $duplicate_package_comment .= "\nmatch md5sum $md5sum \n"; >- FetchOneColumn2(); >- } elsif(!$md5sumOverride){ >- FetchOneColumn2() && ThrowUserError("duplicate_attachment"); >- } >+ SendSQL2("SELECT attach_id, bug_id FROM cert_records >+ JOIN cert_rpms ON cert_records.id = cert_rpms.cert_id >+ WHERE md5sum = ". SqlQuote($md5sum)"); >+ while (my @row = FetchSQLData2()){ >+ if($md5sumOverride){ >+ my $attach_id = shift @row; >+ my $bug_id = shift @row; >+ $duplicate_package_comment .= "\n $filename already attached as attachment $attach_id in bug $bug_id"; >+ }else{ >+ ThrowUserError("duplicate_attachment"); >+ } >+ } >+} > > # Escape characters in strings that will be used in SQL statements. > my $sqlfilename = SqlQuote($filename); >@@ -1031,7 +1016,7 @@ > $Text::Wrap::columns = 80; > $Text::Wrap::huge = 'overflow'; > $comment = Text::Wrap::wrap('', '', $comment); >- $comment .= "\n\n\n" . $duplicate_package_comment if ($md5sumOverride); >+ $comment .= $duplicate_package_comment;" > > AppendComment($::FORM{'bugid'}, > $::COOKIE{"Bugzilla_login"},
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 453613
:
311105
|
311359
|
311524
|
311916
|
312278
|
312754
|
312935