]> git.mxchange.org Git - fba.git/commitdiff
Domain unshielding for Friendica
authorMint <>
Fri, 9 Sep 2022 14:45:22 +0000 (17:45 +0300)
committerMint <>
Fri, 9 Sep 2022 14:45:22 +0000 (17:45 +0300)
fetch_blocks.py

index fcf5d151a388129851bfe50cddeaa8e65e992a97..efbed2f7990630c519ca413e46611ee45f4b899f 100644 (file)
@@ -312,6 +312,16 @@ for blocker, software in c.fetchall():
                 for instance in blocks:
                     blocked, reason = instance.values()
                     blocked = tidyup(blocked)
+
+                    if blocked.count("*") > 0:
+                        # Some friendica servers also obscure domains without hash
+                        c.execute(
+                            "select domain from instances where domain like ? order by rowid limit 1", (blocked.replace("*", "_"),)
+                        )
+                        searchres = c.fetchone()
+                        if searchres != None:
+                            blocked = searchres[0]
+
                     c.execute(
                         "select domain from instances where domain = ?", (blocked,)
                     )