diff options
| author | Graham Sutherland <gsuberland@users.noreply.github.com> | 2024-01-26 22:28:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 22:28:14 +0000 |
| commit | 0b194f1922f1eedf0e4cf7d9dce59b47e7f5389a (patch) | |
| tree | 580fc2df98198c7f2dfbb31469ec8ebfcba6139e /src | |
| parent | b39b8606219bd3957b28310b2a4b42f2f8ce3f21 (diff) | |
| download | slskd-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.cs | 4 |
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 +} |
