Router: Ban hash of all-zero RI

seen live on the net
This commit is contained in:
zzz
2025-02-23 07:43:26 -05:00
parent 68ebda19c5
commit dceef0dae2
2 changed files with 9 additions and 1 deletions
@@ -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 {