* 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

@ -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;
}

View File

@ -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;
}