forked from I2P_Developers/i2p.i2p
* 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:
@@ -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
|
||||
;
|
||||
|
@@ -118,7 +118,7 @@ public class EepGetNamingService extends NamingService {
|
||||
if (key.startsWith(hostname + "=")) // strip hostname=
|
||||
key = key.substring(hostname.length() + 1);
|
||||
key = key.substring(0, DEST_SIZE); // catch IndexOutOfBounds exception below
|
||||
if (!key.endsWith("AAAA")) {
|
||||
if (!key.endsWith("AA")) {
|
||||
_log.error("Invalid key: " + url + hostname);
|
||||
return null;
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ public class ExecNamingService extends NamingService {
|
||||
if (key.startsWith(hostname + "=")) // strip hostname=
|
||||
key = key.substring(hostname.length() + 1);
|
||||
key = key.substring(0, DEST_SIZE); // catch IndexOutOfBounds exception below
|
||||
if (!key.endsWith("AAAA")) {
|
||||
if (!key.endsWith("AA")) {
|
||||
_log.error("Invalid key: " + command);
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user