diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java index 3d53d96266e69083c028445aa5a581514d902c00..7696a33a8a4a8fd6accce083014c2b086151fdff 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java @@ -57,7 +57,7 @@ class BanlistRenderer { buf.append("<li>").append(_context.commSystem().renderPeerHTML(key)); buf.append(' '); String expireString = DataHelper.formatDuration2(expires); - if (key.equals(Hash.FAKE_HASH)) + if (key.equals(Hash.FAKE_HASH) || key.equals(Banlist.HASH_ZERORI)) buf.append(_t("Permanently banned")); else if (expires < 5l*24*60*60*1000) buf.append(_t("Temporary ban expiring in {0}", expireString)); diff --git a/router/java/src/net/i2p/router/Banlist.java b/router/java/src/net/i2p/router/Banlist.java index 10be23c89c76cf4f8c88aff7c2ada5b2b3d6f32d..113f4a66992b268738847ad58fef3a87a3f2225a 100644 --- a/router/java/src/net/i2p/router/Banlist.java +++ b/router/java/src/net/i2p/router/Banlist.java @@ -18,6 +18,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import net.i2p.data.Base64; import net.i2p.data.DataHelper; import net.i2p.data.Hash; import net.i2p.router.peermanager.PeerProfile; @@ -35,6 +36,12 @@ public class Banlist { private final Log _log; private final RouterContext _context; private final Map<Hash, Entry> _entries; + + /** + * hash of 387 zeros + * @since 0.9.66 + */ + public static final Hash HASH_ZERORI = new Hash(Base64.decode("MRn86w6tHQgE25D7DIejOBCJ-dImSjdsQaOaBuUypkE=")); public static class Entry { /** when it should expire, per the i2p clock */ @@ -70,6 +77,7 @@ public class Banlist { _context.jobQueue().addJob(new Cleanup(_context)); // i2pd bug? banlistRouterForever(Hash.FAKE_HASH, "Invalid Hash"); + banlistRouterForever(HASH_ZERORI, "Invalid Hash"); } private class Cleanup extends JobImpl {