I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 1c7111ec authored by zzz's avatar zzz
Browse files

alternate base32 check

parent 831f09c9
No related branches found
No related tags found
No related merge requests found
...@@ -181,6 +181,9 @@ public class AddressBook { ...@@ -181,6 +181,9 @@ public class AddressBook {
host.replaceAll("[a-z0-9.-]", "").length() == 0 && host.replaceAll("[a-z0-9.-]", "").length() == 0 &&
// Base32 spoofing (52chars.i2p) // Base32 spoofing (52chars.i2p)
(! (host.length() == 56 && host.substring(0,52).replaceAll("[a-z2-7]", "").length() == 0)) && (! (host.length() == 56 && host.substring(0,52).replaceAll("[a-z2-7]", "").length() == 0)) &&
// ... or maybe we do Base32 this way ...
(! host.equals("b32.i2p")) &&
(! host.endsWith(".b32.i2p")) &&
// some reserved names that may be used for local configuration someday // some reserved names that may be used for local configuration someday
(! host.equals("proxy.i2p")) && (! host.equals("proxy.i2p")) &&
(! host.equals("router.i2p")) && (! host.equals("router.i2p")) &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment