summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-10-22 14:57:12 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-22 14:57:12 +0200
commitdcbab52d1366aa60b769ff59ad3f724c3b4c8d70 (patch)
treed515da19827dc36a179224f8689ebb1d53969196 /Bugzilla
parent0648da61a152736bcc39cf37e8aadaeda4c10e75 (diff)
downloadbugzilla-dcbab52d1366aa60b769ff59ad3f724c3b4c8d70.tar.gz
bugzilla-dcbab52d1366aa60b769ff59ad3f724c3b4c8d70.tar.xz
Bug 413648: Attachment mime type handling should strip leading and trailing spaces
a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Attachment.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index f63973875..0f6bf0a74 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -511,6 +511,7 @@ sub _check_content_type {
my ($invocant, $content_type) = @_;
$content_type = 'text/plain' if (ref $invocant && $invocant->ispatch);
+ $content_type = trim($content_type);
my $legal_types = join('|', LEGAL_CONTENT_TYPES);
if (!$content_type or $content_type !~ /^($legal_types)\/.+$/) {
ThrowUserError("invalid_content_type", { contenttype => $content_type });