diff --git a/core/java/src/net/i2p/data/LeaseSet.java b/core/java/src/net/i2p/data/LeaseSet.java index b844c7e3a7..0fd4ed845f 100644 --- a/core/java/src/net/i2p/data/LeaseSet.java +++ b/core/java/src/net/i2p/data/LeaseSet.java @@ -418,10 +418,10 @@ public class LeaseSet extends DatabaseEntry { encryp(key); } catch (DataFormatException dfe) { Log log = I2PAppContext.getGlobalContext().logManager().getLog(LeaseSet.class); - log.error("Error encrypting lease: " + _destination.calculateHash()); + log.error("Error encrypting lease: " + _destination.calculateHash(), dfe); } catch (IOException ioe) { Log log = I2PAppContext.getGlobalContext().logManager().getLog(LeaseSet.class); - log.error("Error encrypting lease: " + _destination.calculateHash()); + log.error("Error encrypting lease: " + _destination.calculateHash(), ioe); } } @@ -520,7 +520,11 @@ public class LeaseSet extends DatabaseEntry { private synchronized boolean isEncrypted() { if (_decrypted) return true; - if (_checked || _destination == null) + // If the encryption key is not set yet, it can't have been encrypted yet. + // Router-side I2CP sets the destination (but not the encryption key) + // on an unsigned LS which is pending signature (and possibly encryption) + // by the client, and we don't want to attempt 'decryption' on it. + if (_checked || _encryptionKey == null || _destination == null) return false; SessionKey key = I2PAppContext.getGlobalContext().keyRing().get(_destination.calculateHash()); if (key != null) { @@ -529,10 +533,10 @@ public class LeaseSet extends DatabaseEntry { _decrypted = true; } catch (DataFormatException dfe) { Log log = I2PAppContext.getGlobalContext().logManager().getLog(LeaseSet.class); - log.error("Error decrypting lease: " + _destination.calculateHash() + dfe); + log.error("Error decrypting lease: " + _destination.calculateHash(), dfe); } catch (IOException ioe) { Log log = I2PAppContext.getGlobalContext().logManager().getLog(LeaseSet.class); - log.error("Error decrypting lease: " + _destination.calculateHash() + ioe); + log.error("Error decrypting lease: " + _destination.calculateHash(), ioe); } } _checked = true; diff --git a/history.txt b/history.txt index aadfe30a8a..5ecc00a620 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,11 @@ +2015-06-23 zzz + * Console: Fix NPE on /configtunnels + * GeoIP: Add countries and flags for Asia/Pacific, Bonaire, St. Barts, + St. Maarten, South Sudan + * I2CP: Don't try to decrypt an LS before it's encrypted (ticket #1608) + * Router: Increase default outbound bandwidth to 60 KBps; + raise class L/M boundary to match so defaulted routers are still L + 2015-06-22 dg * NetDB: Partially revert last NetDB change: flood because we don't want to create a hole in the DHT before publisher resends to somebody else. diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index f2522cd4ed..7ca1a3ec2c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 9; + public final static long BUILD = 10; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java b/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java index f5ec343a01..81a3b6354f 100644 --- a/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java +++ b/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java @@ -64,7 +64,7 @@ class RequestLeaseSetJob extends JobImpl { // _log.debug("Adding fudge " + fudge); endTime += fudge; - SessionId id = _runner.getSessionId(_requestState.getRequested().getDestination().calculateHash()); + SessionId id = _runner.getSessionId(requested.getDestination().calculateHash()); if (id == null) return; I2CPMessage msg;