From b9edb80e7081c42f0a733450b63eca84f6780dac Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Tue, 22 Oct 2024 20:00:32 -0400 Subject: [PATCH] Fix missing ContentType --- src/Web/Common/BlobStorage/ContentTypes.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/Common/BlobStorage/ContentTypes.cs b/src/Web/Common/BlobStorage/ContentTypes.cs index e692ed5..6ed4d3d 100644 --- a/src/Web/Common/BlobStorage/ContentTypes.cs +++ b/src/Web/Common/BlobStorage/ContentTypes.cs @@ -9,7 +9,7 @@ public static class ContentTypes private const string ImageJpg = "image/jpg"; private static string TextHtml = "text/html"; - private static readonly HashSet AllowedContentTypes = [ImagePng, ImageJpeg, ImageJpg]; + private static readonly HashSet AllowedContentTypes = [ImagePng, ImageJpeg, ImageJpg, TextHtml]; public static bool IsAllowed( string contentType, @@ -36,7 +36,7 @@ public static class ContentTypes { return true; } - + // Check for HTML content by looking for "" or "" tags string content = Encoding.UTF8.GetString(buffer); if (content.Contains(""))