Skip to content

Usenet streaming with a WebDAV server and a SABnzbd-compatible API

C#

Fixed case-sensativity of blacklisted extensions.

nzbdav-dev7561bcba8ac3
diff --git a/backend/Queue/PostProcessors/BlacklistedExtensionPostProcessor.cs b/backend/Queue/PostProcessors/BlacklistedExtensionPostProcessor.cs
index 2bb6ae10..ddb8c997 100644
--- a/backend/Queue/PostProcessors/BlacklistedExtensionPostProcessor.cs
+++ b/backend/Queue/PostProcessors/BlacklistedExtensionPostProcessor.cs
@@ -15,7 +15,7 @@ public class BlacklistedExtensionPostProcessor(ConfigManager configManager, DavD
.Where(x => x.State == EntityState.Added)
.Select(x => x.Entity)
.Where(x => x.Type != DavItem.ItemType.Directory)
- .Where(x => blacklistedExtensions.Contains(Path.GetExtension(x.Name)));
+ .Where(x => blacklistedExtensions.Contains(Path.GetExtension(x.Name).ToLower()));
foreach (var blacklistedFile in blacklistedFiles)
RemoveBlacklistedFile(blacklistedFile);
diff --git a/backend/Services/HealthCheckService.cs b/backend/Services/HealthCheckService.cs
index 1d875b12..bfe483ed 100644
--- a/backend/Services/HealthCheckService.cs
+++ b/backend/Services/HealthCheckService.cs
@@ -204,7 +204,7 @@ public class HealthCheckService
// if the file extension has been marked as ignored,
// then don't bother trying to repair it. We can simply delete it.
var blacklistedExtensions = _configManager.GetBlacklistedExtensions();
- if (blacklistedExtensions.Contains(Path.GetExtension(davItem.Name)))
+ if (blacklistedExtensions.Contains(Path.GetExtension(davItem.Name).ToLower()))
{
dbClient.Ctx.Items.Remove(davItem);
dbClient.Ctx.HealthCheckResults.Add(SendStatus(new HealthCheckResult()