浏览代码

Properly check LAN IP in HasRemoteAccess

We cannot simply use the subnet list to check if the IP is in LAN as it does not handle special cases like IPv4MappedToIPv6 and IPv6 loopback addresses.
gnattu 5 月之前
父节点
当前提交
2a96b8b34b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Jellyfin.Networking/Manager/NetworkManager.cs

+ 1 - 1
src/Jellyfin.Networking/Manager/NetworkManager.cs

@@ -702,7 +702,7 @@ public class NetworkManager : INetworkManager, IDisposable
                 return false;
             }
         }
-        else if (!_lanSubnets.Any(x => x.Contains(remoteIP)))
+        else if (!IsInLocalNetwork(remoteIP))
         {
             // Remote not enabled. So everyone should be LAN.
             return false;