diff --git a/src/Icons/Controllers/IconsController.cs b/src/Icons/Controllers/IconsController.cs index 34c1da2133..df44f915fa 100644 --- a/src/Icons/Controllers/IconsController.cs +++ b/src/Icons/Controllers/IconsController.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; @@ -19,15 +18,6 @@ namespace Bit.Icons.Controllers AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }); - static readonly List _validImageData = new List - { - // png - new byte[] { 137, 80, 78, 71 }, - // ico - new byte[] { 00, 00, 01, 00 }, - // jpeg - new byte[] { 255, 216, 255 } - }; private readonly IMemoryCache _memoryCache; private readonly IDomainMappingService _domainMappingService; private readonly IconsSettings _iconsSettings; @@ -70,11 +60,6 @@ namespace Bit.Icons.Controllers } var image = await response.Content.ReadAsByteArrayAsync(); - if(!_validImageData.Any(d => d.SequenceEqual(image.Take(d.Length)))) - { - return new NotFoundResult(); - } - icon = new Icon { Image = image,