From: Frédéric Buclin Date: Fri, 22 Oct 2010 12:57:12 +0000 (+0200) Subject: Bug 413648: Attachment mime type handling should strip leading and trailing spaces X-Git-Tag: bugzilla-4.1.1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbab52d1366aa60b769ff59ad3f724c3b4c8d70;p=thirdparty%2Fbugzilla.git Bug 413648: Attachment mime type handling should strip leading and trailing spaces a=LpSolit --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index f63973875f..0f6bf0a74c 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 });