]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 19:14:44 +0000 (21:14 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 19:14:44 +0000 (21:14 +0200)
- prevent .arpa domains being added by instances.add()

fba/commands.py
fba/networks/pleroma.py

index da46e6c752f21a3cc091cc37feaa2c1d0df0c319..2c50c686862eb09e663384c16dee8dee121ebacb 100644 (file)
@@ -237,6 +237,9 @@ def fetch_blocks(args: argparse.Namespace):
                     if not validators.domain(blocked):
                         print(f"WARNING: blocked='{blocked}',software='{software}' is not a valid domain name - SKIPPED!")
                         continue
+                    elif blocked.endswith(".arpa"):
+                        # DEBUG: print(f"DEBUG: blocked='{blocked}' is ending with '.arpa' - SKIPPED!")
+                        continue
                     elif not instances.is_registered(blocked):
                         # DEBUG: print("DEBUG: Hash wasn't found, adding:", blocked, blocker)
                         try:
index 6fe2422c3a376f8895ea22433f6ee96550673e90..68224951380421049fa89266e8cf1fc26ba7f9f6 100644 (file)
@@ -311,6 +311,7 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     if entry["blocked"] == blocked:
                         # DEBUG: print(f"DEBUG: Updating entry reason: blocked='{blocked}',reason='{reason}'")
                         entry["reason"] = reason
+
     elif "quarantined_instances_info" in data and "quarantined_instances" in data["quarantined_instances_info"]:
         # DEBUG: print(f"DEBUG: Found 'quarantined_instances_info' in JSON response: domain='{domain}'")
         block_level = "quarantined"