Bugfix: verify ip before net.contains
This commit is contained in:
parent
a8046e2c2b
commit
6bd7492f74
|
@ -69,7 +69,9 @@ async function updateUserIdMappings() {
|
|||
|
||||
const net = ip.cidrSubnet(pAHost.cidr)
|
||||
|
||||
const devices = allDevices.filter(device => net.contains(device.ip))
|
||||
const devices = allDevices.filter(
|
||||
({ ip }) => isIPv4(ip) && net.contains(ip)
|
||||
)
|
||||
|
||||
try {
|
||||
// console.log(pAHost.id, pAHost.description, devices.length)
|
||||
|
|
Loading…
Reference in New Issue
Block a user