Skip to content

Commit

Permalink
Merge branch 'release/3.803.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Feb 26, 2024
2 parents 2842a00 + 05cae62 commit 78cf5e3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Expand Up @@ -2,7 +2,7 @@
<Project>
<!-- These properties will be shared for all projects -->
<PropertyGroup>
<VersionPrefix>3.802.0</VersionPrefix>
<VersionPrefix>3.803.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
Expand Down
@@ -1,5 +1,4 @@
using System;
using System.IO;
using Microsoft.Extensions.Options;
using VirtoCommerce.AssetsModule.Core.Services;
using VirtoCommerce.Platform.Core;
Expand All @@ -19,8 +18,7 @@ protected BasicBlobProvider(IOptions<PlatformOptions> platformOptions, ISettings

public virtual bool IsExtensionBlacklisted(string path)
{
var extension = Path.GetExtension(path);
var allowed = _fileExtensionService.IsExtensionAllowedAsync(extension).GetAwaiter().GetResult();
var allowed = _fileExtensionService.IsExtensionAllowedAsync(path).GetAwaiter().GetResult();
return !allowed;
}
}
Expand Down
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
Expand All @@ -23,9 +24,11 @@ public FileExtensionService(IOptions<PlatformOptions> platformOptions, ISettings
_settingsManager = settingsManager;
}

public virtual async Task<bool> IsExtensionAllowedAsync(string extension)
public virtual async Task<bool> IsExtensionAllowedAsync(string path)
{
var extension = Path.GetExtension(path);
var whiteList = await GetWhiteListAsync();

if (whiteList.Count != 0)
{
return whiteList.Contains(extension, _ignoreCase);
Expand Down
Expand Up @@ -7,5 +7,5 @@ public interface IFileExtensionService
{
Task<IList<string>> GetWhiteListAsync();
Task<IList<string>> GetBlackListAsync();
Task<bool> IsExtensionAllowedAsync(string extension);
Task<bool> IsExtensionAllowedAsync(string path);
}
2 changes: 1 addition & 1 deletion src/VirtoCommerce.AssetsModule.Web/module.manifest
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<id>VirtoCommerce.Assets</id>
<version>3.802.0</version>
<version>3.803.0</version>
<version-tag />
<platformVersion>3.800.0</platformVersion>
<dependencies />
Expand Down
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 78cf5e3

Please sign in to comment.