Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
0514605a
Commit
0514605a
authored
Oct 19, 2001
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 60818 - make Bugzilla cope with MIME types with parameters. Patch by gerv, r=myk.
parent
858fd64e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
bug_form.pl
bug_form.pl
+1
-0
createattachment.cgi
createattachment.cgi
+3
-2
No files found.
bug_form.pl
View file @
0514605a
...
...
@@ -299,6 +299,7 @@ if (Param('useattachmenttracker')) {
}
my
$link
=
"showattachment.cgi?attach_id=$attachid"
;
$desc
=
value_quote
(
$desc
);
$mimetype
=
html_quote
(
$mimetype
);
print
qq{<td><a href="$link">$date</a></td><td colspan=6>$desc ($mimetype)</td></tr><tr><td></td>}
;
}
print
"<td colspan=7><a href=\"createattachment.cgi?id=$id\">Create a new attachment</a> (proposed patch, testcase, etc.)</td></tr></table>\n"
;
...
...
createattachment.cgi
View file @
0514605a
...
...
@@ -84,8 +84,9 @@ What kind of file is this?
if
(
$mimetype
eq
"other"
)
{
$mimetype
=
$::FORM
{
'othertype'
};
}
if
(
$mimetype
!~
m@^(\w|-|\+|\.)+/(\w|-|\+|\.)+$@
)
{
PuntTryAgain
(
"You must select a legal mime type. '<tt>$mimetype</tt>' simply will not do."
);
if
(
$mimetype
!~
m@^(\w|-|\+|\.)+/(\w|-|\+|\.)+(;.*)?$@
)
{
PuntTryAgain
(
"You must select a legal mime type. '<tt>"
.
html_quote
(
$mimetype
)
.
"</tt>' simply will not do."
);
}
SendSQL
(
"insert into attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id,"
.
SqlQuote
(
$::FILENAME
{
'data'
})
.
", "
.
SqlQuote
(
$desc
)
.
", "
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment