]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 413648: Attachment mime type handling should strip leading and trailing spaces
authorFrédéric Buclin <LpSolit@gmail.com>
Fri, 22 Oct 2010 12:57:12 +0000 (14:57 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 22 Oct 2010 12:57:12 +0000 (14:57 +0200)
a=LpSolit

Bugzilla/Attachment.pm

index f63973875f74583d28afc25b04cf532061a0a461..0f6bf0a74c106d8775cb8ad3fc70597af6476857 100644 (file)
@@ -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 });