diff --git a/configurator.py b/configurator.py index 87af57e..f053d95 100755 --- a/configurator.py +++ b/configurator.py @@ -3497,6 +3497,7 @@ def load_settings(settingsfile): ipaddress.ip_network(net) except Exception: LOG.warning("Invalid network in ALLOWED_NETWORKS: %s", net) + ALLOWED_NETWORKS.remove(net) BANNED_IPS = settings.get("BANNED_IPS", BANNED_IPS) if BANNED_IPS and not all(BANNED_IPS): LOG.warning("Invalid value for BANNED_IPS. Using empty list.") @@ -3506,6 +3507,7 @@ def load_settings(settingsfile): ipaddress.ip_address(banned_ip) except Exception: LOG.warning("Invalid IP address in BANNED_IPS: %s", banned_ip) + BANNED_IPS.remove(banned_ip) BANLIMIT = settings.get("BANLIMIT", BANLIMIT) DEV = settings.get("DEV", DEV) IGNORE_PATTERN = settings.get("IGNORE_PATTERN", IGNORE_PATTERN)