aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGraham Sutherland <gsuberland@users.noreply.github.com>2024-01-26 22:28:14 +0000
committerGitHub <noreply@github.com>2024-01-26 22:28:14 +0000
commit0b194f1922f1eedf0e4cf7d9dce59b47e7f5389a (patch)
tree580fc2df98198c7f2dfbb31469ec8ebfcba6139e /src
parentb39b8606219bd3957b28310b2a4b42f2f8ce3f21 (diff)
downloadslskd-0b194f1922f1eedf0e4cf7d9dce59b47e7f5389a.tar.gz
Update IsBlacklisted to use the new GetBlacklistedCIDRs function.
This ensures that blacklisted CIDRs from both the config file and the blacklist file are considered.
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Users/UserService.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Users/UserService.cs b/src/slskd/Users/UserService.cs
index 5b15b671..324e3743 100644
--- a/src/slskd/Users/UserService.cs
+++ b/src/slskd/Users/UserService.cs
@@ -273,7 +273,7 @@ namespace slskd.Users
return true;
}
- if (ipAddress is not null && blacklist.Cidrs.Select(c => IPAddressRange.Parse(c)).Any(range => range.Contains(ipAddress)))
+ if (ipAddress is not null && blacklist.GetBlacklistedCIDRs().Any(range => range.Contains(ipAddress)))
{
return true;
}
@@ -410,4 +410,4 @@ namespace slskd.Users
updateValueFactory: (key, user) => user with { Username = username, Status = status });
}
}
-} \ No newline at end of file
+}