From 2de25ca453d4a57555fc4612ad21ed7c292b4f70 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Mon, 27 Feb 2017 19:50:21 +0000
Subject: [PATCH] addressbook: Add date parameter to authentication strings

---
 core/java/src/net/i2p/client/naming/HostTxtEntry.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/java/src/net/i2p/client/naming/HostTxtEntry.java b/core/java/src/net/i2p/client/naming/HostTxtEntry.java
index 3023649d47..96a9549598 100644
--- a/core/java/src/net/i2p/client/naming/HostTxtEntry.java
+++ b/core/java/src/net/i2p/client/naming/HostTxtEntry.java
@@ -396,6 +396,8 @@ public class HostTxtEntry {
             throw new IllegalStateException();
         props.setProperty(PROP_NAME, name);
         props.setProperty(PROP_DEST, dest);
+        if (!props.containsKey(PROP_DATE))
+            props.setProperty(PROP_DATE, Long.toString(System.currentTimeMillis() / 1000));
         StringWriter buf = new StringWriter(1024);
         try {
             writeProps(buf);
@@ -418,6 +420,8 @@ public class HostTxtEntry {
             throw new IllegalStateException();
         if (props.containsKey(sigprop))
             throw new IllegalStateException();
+        if (!props.containsKey(PROP_DATE))
+            props.setProperty(PROP_DATE, Long.toString(System.currentTimeMillis() / 1000));
         StringWriter buf = new StringWriter(1024);
         buf.append(name);
         buf.append(KV_SEPARATOR);
-- 
GitLab