Changeset 5c1864e


Ignore:
Timestamp:
Jan 5, 2009 3:06:29 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
efc604a
Parents:
53ce3c4
Message:

addressbook: Prevent Base32 hostnames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/addressbook/AddressBook.java

    r53ce3c4 r5c1864e  
    180180                (host.indexOf("--") < 0 || host.startsWith("xn--") || host.indexOf(".xn--") > 0) &&
    181181                host.replaceAll("[a-z0-9.-]", "").length() == 0 &&
     182                // Base32 spoofing (52chars.i2p)
     183                (! (host.length() == 56 && host.substring(0,52).replaceAll("[a-z2-7]", "").length() == 0)) &&
    182184                // some reserved names that may be used for local configuration someday
    183185                (! host.equals("proxy.i2p")) &&
Note: See TracChangeset for help on using the changeset viewer.