* Addressbook: Disallow '.-' and '-.' in host names

* NTCP: Don't drop a connection unless both directions are idle;
            Fix idle time for outbound connections
    * Outbound message: Make sure cached lease is in current leaseSet
    * Stats: Put all NetworkDatabase stats in same group
    * TunnelPool: Stop building tunnels and leaseSets after client shutdown
    * i2psnark: Add locking to prevent two I2CP connections
This commit is contained in:
zzz
2008-04-12 21:34:25 +00:00
parent 215eb14d38
commit 0b600669c7
11 changed files with 38 additions and 15 deletions

View File

@ -167,7 +167,8 @@ public class AddressBook {
host.length() <= 67 && // 63 + ".i2p"
(! host.startsWith(".")) &&
(! host.startsWith("-")) &&
(! host.endsWith("-.i2p")) &&
host.indexOf(".-") < 0 &&
host.indexOf("-.") < 0 &&
host.indexOf("..") < 0 &&
// IDN - basic check, not complete validation
(host.indexOf("--") < 0 || host.startsWith("xn--") || host.indexOf(".xn--") > 0) &&