]> 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 13:00:16 +0000 (15:00 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 22 Oct 2010 13:00:16 +0000 (15:00 +0200)
a=LpSolit

Bugzilla/Attachment.pm

index 9c70e2d271784d13593c6a11cf509bf002bee468..adc6ddcf2c424643f05efe01acb56750dfb1e8d9 100644 (file)
@@ -526,6 +526,7 @@ sub _check_content_type {
     my ($invocant, $content_type) = @_;
 
     $content_type = 'text/plain' if (ref $invocant && ($invocant->isurl || $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 });