Update Jellyfin.Networking/Manager/NetworkManager.cs

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
BaronGreenback 2021-03-11 22:46:07 +00:00 committed by GitHub
parent 034ee38583
commit f66cb9777d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -593,18 +593,7 @@ namespace Jellyfin.Networking.Manager
if (RemoteAddressFilter.Count > 0 && !IsInLocalNetwork(remoteIp))
{
// remoteAddressFilter is a whitelist or blacklist.
bool isListed = RemoteAddressFilter.ContainsAddress(remoteIp);
if (config.IsRemoteIPFilterBlacklist)
{
// Black list, so flip over.
isListed = !isListed;
}
if (!isListed)
{
// If your name isn't on the list, you arn't coming in.
return false;
}
return RemoteAddressFilter.ContainsAddress(remoteIp) == !config.IsRemoteIPFilterBlacklist;
}
}
else if (!IsInLocalNetwork(remoteIp))