I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 71ddfa42 authored by zzz's avatar zzz
Browse files

* i2psnark: Don't do a naming lookup for Base64 destkeys

parent 1ecb84f3
No related branches found
No related tags found
No related merge requests found
...@@ -206,15 +206,15 @@ public class I2PSnarkUtil { ...@@ -206,15 +206,15 @@ public class I2PSnarkUtil {
Destination getDestination(String ip) { Destination getDestination(String ip) {
if (ip == null) return null; if (ip == null) return null;
if (ip.endsWith(".i2p")) { if (ip.endsWith(".i2p")) {
Destination dest = _context.namingService().lookup(ip); if (ip.length() < 520) { // key + ".i2p"
if (dest != null) { Destination dest = _context.namingService().lookup(ip);
return dest; if (dest != null)
} else { return dest;
try { }
return new Destination(ip.substring(0, ip.length()-4)); // sans .i2p try {
} catch (DataFormatException dfe) { return new Destination(ip.substring(0, ip.length()-4)); // sans .i2p
return null; } catch (DataFormatException dfe) {
} return null;
} }
} else { } else {
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment