From 377bca85ae4e8270b329dd8b615e84eefb5a8546 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 28 Sep 2014 13:57:19 +0200 Subject: [PATCH] Set latest edition on the insert URI, too. This should prevent ridiculously large editions when creating insert keys from the identity keys. --- src/main/java/net/pterodactylus/sone/data/SoneImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/data/SoneImpl.java b/src/main/java/net/pterodactylus/sone/data/SoneImpl.java index 86c5935..341746b 100644 --- a/src/main/java/net/pterodactylus/sone/data/SoneImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/SoneImpl.java @@ -190,7 +190,10 @@ public class SoneImpl implements Sone { return null; } try { - return new FreenetURI(((OwnIdentity) getIdentity()).getInsertUri()).setDocName("Sone").setMetaString(new String[0]); + return new FreenetURI(((OwnIdentity) getIdentity()).getInsertUri()) + .setDocName("Sone") + .setMetaString(new String[0]) + .setSuggestedEdition(latestEdition); } catch (MalformedURLException e) { throw new IllegalStateException(format("Own identity %s's insert URI is incorrect.", getIdentity()), e); } -- 2.7.4