# DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - skipping!")
continue
elif blocked.count("*") > 1:
- # -ACK!-oma also started obscuring domains without hash
+ # Obsured domain name with no hash
+ # DEBUG: print(f"DEBUG: Trying to de-obscure blocked='{blocked}' ...")
fba.cursor.execute(
"SELECT domain, nodeinfo_url FROM instances WHERE domain LIKE ? ORDER BY rowid LIMIT 1", [blocked.replace("*", "_")]
)
print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
continue
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' de-obscured to '{searchres[0]}'")
blocked = searchres[0]
nodeinfo_url = searchres[1]
- # DEBUG: print("DEBUG: Looked up domain:", blocked)
- elif not validators.domain(blocked):
+
+ # DEBUG: print(f"DEBUG: blocked='{blocked}'")
+ if not validators.domain(blocked):
print(f"WARNING: blocked='{blocked}',software='pleroma' is not a valid domain name - skipped!")
continue
elif blocked.split(".")[-1] == "arpa":
print(f"WARNING: blocked='{blocked}' is a reversed .arpa domain and should not be used generally.")
continue
-
- # DEBUG: print("DEBUG: Looking up instance by domain:", blocked)
- if not instances.is_registered(blocked):
+ elif not instances.is_registered(blocked):
# Commit changes
fba.connection.commit()
if blocked == "":
print("WARNING: blocked is empty after tidyup.domain():", domain, block_level)
continue
- elif not validators.domain(blocked):
- print(f"WARNING: blocked='{blocked}',software='pleroma' is not a valid domain name - skipped!")
- continue
elif blacklist.is_blacklisted(blocked):
# DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - skipping!")
continue
elif blocked.count("*") > 1:
- # same domain guess as above, but for reasons field
+ # Obsured domain with no hash
+ # DEBUG: print(f"DEBUG: Trying to de-obscure blocked='{blocked}' ...")
fba.cursor.execute(
"SELECT domain, origin, nodeinfo_url FROM instances WHERE domain LIKE ? ORDER BY rowid LIMIT 1", [blocked.replace("*", "_")]
)
print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
continue
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' de-obscured to '{searchres[0]}'")
blocked = searchres[0]
origin = searchres[1]
nodeinfo_url = searchres[2]
+ elif not validators.domain(blocked):
+ print(f"WARNING: blocked='{blocked}',software='pleroma' is not a valid domain name - skipped!")
+ continue
- # DEBUG: print("DEBUG: Looking up instance by domain:", blocked)
+ # DEBUG: print(f"DEBUG: blocked='{blocked}'")
if blocked.split(".")[-1] == "arpa":
print(f"WARNING: blocked='{blocked}' is a reversed .arpa domain and should not be used generally.")
continue