* Addressbook, NamingService: Allow 516 byte dests

that end with AA but not AAAA, so we can permit
      non-null zero-length certs.
This commit is contained in:
zzz
2009-11-10 14:44:40 +00:00
parent e02845076d
commit ee51f69a5a
3 changed files with 4 additions and 3 deletions

View File

@ -193,7 +193,8 @@ public class AddressBook {
(! host.endsWith(".router.i2p")) &&
(! host.endsWith(".console.i2p")) &&
((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AAAA")) ||
// null cert ends with AAAA but other zero-length certs would be AA
((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) ||
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
dest.replaceAll("[a-zA-Z0-9~-]", "").length() == 0
;