From: David ‘Bombe’ Roden Date: Sun, 28 Sep 2014 11:57:19 +0000 (+0200) Subject: Set latest edition on the insert URI, too. X-Git-Tag: 0.9-rc1^2~3^2~96 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=377bca85ae4e8270b329dd8b615e84eefb5a8546;hp=239f08e37721401290f43596e8a7e9aa83aae980 Set latest edition on the insert URI, too. This should prevent ridiculously large editions when creating insert keys from the identity keys. --- 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); }