From a7485ab5a344611b6cfc43d8a17ce458d87d4863 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 21 Jul 2013 20:17:42 +0000 Subject: [PATCH] * I2CP: - Oops, must enforce property length limits even when inside router JVM as the properties are serialized for signing. --- core/java/src/net/i2p/client/I2PSessionImpl.java | 6 +++--- router/java/src/net/i2p/router/RouterVersion.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index 19c130266..29389bdea 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -309,10 +309,10 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa continue; } String val = options.getProperty(key); - // not serializing (no limit) in router ctx + // Long strings MUST be removed, even in router context, + // as the session config properties must be serialized to be signed. // fixme, bytes could still be over 255 (unlikely) - if ((!_context.isRouterContext()) && - (key.length() > 255 || val.length() > 255)) { + if (key.length() > 255 || val.length() > 255) { if (_log.shouldLog(Log.WARN)) _log.warn("Not passing on property [" + key diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index fecba78d6..a6204817e 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 = 7; + public final static long BUILD = 8; /** for example "-test" */ public final static String EXTRA = "";