From: Frédéric Buclin Date: Fri, 22 Oct 2010 13:00:16 +0000 (+0200) Subject: Bug 413648: Attachment mime type handling should strip leading and trailing spaces X-Git-Tag: bugzilla-4.0rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=470113423ec83d47fe0457a6f9c80877f65ea9f9;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 9c70e2d271..adc6ddcf2c 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -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 });