Skip to content

Commit

Permalink
Checks the extension of allowed media files without case checking (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
sparkie79 authored Dec 13, 2024
1 parent aa9fdcb commit 411cbf1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override async Task<IDisplayResult> UpdateAsync(MediaField field, UpdateF
{
var extension = Path.GetExtension(field.Paths[i]);

if (!settings.AllowedExtensions.Contains(extension))
if (!settings.AllowedExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase))
{
context.Updater.ModelState.AddModelError(Prefix, nameof(model.Paths), S["Media extension is not allowed. Only media with '{0}' extensions are allowed.", string.Join(", ", settings.AllowedExtensions)]);
}
Expand Down

0 comments on commit 411cbf1

Please sign in to comment.