Commit 215ac63d authored by dave%intrec.com's avatar dave%intrec.com

Fix for bug 53696: periods(.) and plusses(+) were not being accepted as valid in…

Fix for bug 53696: periods(.) and plusses(+) were not being accepted as valid in mime-types, which are legal per RFC2045 and RFC2048.
parent 53770005
...@@ -92,7 +92,7 @@ What kind of file is this? ...@@ -92,7 +92,7 @@ What kind of file is this?
if ($mimetype eq "other") { if ($mimetype eq "other") {
$mimetype = $::FORM{'othertype'}; $mimetype = $::FORM{'othertype'};
} }
if ($mimetype !~ m@^(\w|-)+/(\w|-)+$@) { if ($mimetype !~ m@^(\w|-|\+|\.)+/(\w|-|\+|\.)+$@) {
Punt("You must select a legal mime type. '<tt>$mimetype</tt>' simply will not do."); Punt("You must select a legal mime type. '<tt>$mimetype</tt>' simply will not do.");
} }
SendSQL("insert into attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id," . SendSQL("insert into attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values ($id," .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment