Commit dcbab52d authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 413648: Attachment mime type handling should strip leading and trailing spaces

a=LpSolit
parent 0648da61
......@@ -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 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment