Compare commits

...

2 Commits

Author SHA1 Message Date
zzz
dc2543ba46 NetDB: Fix reseeding when clock is skewed
reported, fixed, and tested by zlatinb
2022-09-06 15:27:06 -04:00
zzz
b03811af24 SusiDNS: Fix adding to empty address book
by doing form processing even if book is empty.
Do all form processing before displays so the
displays reflect any form add/delete.
Broken in 0.9.50 when form processing call was moved.
Hide replace and add alternate buttons if book is empty.
Ref: https://www.reddit.com/r/i2p/comments/wu7nac/how_do_i_add_to_the_private_address_book/
2022-09-04 08:22:59 -04:00
4 changed files with 49 additions and 4 deletions

View File

@ -77,6 +77,13 @@
<h3 id="addrtitle"><%=intl._t("Address book")%>: <%=intl._t(book.getBook())%></h3>
<h4 id="storagepath"><%=intl._t("Storage")%>: ${book.displayName}</h4>
<%
// This is what does the form processing.
// We need to do this before any notEmpty test and before loadBookMessages() which displays the entry count.
// Messages will be displayed below.
String formMessages = book.getMessages();
%>
${book.loadBookMessages}
<% if (book.getBook().equals("private")) { %>
@ -128,15 +135,18 @@ ${book.loadBookMessages}
</div>
</form>
<% } /* book.getEntries().length() > 0 */ %>
</c:if><% /* book.notEmpty */ %>
</div>
</div><% /* headline */ %>
<div id="messages">${book.messages}<%
<% /* need this whether book is empty or not to display the form messages */ %>
<div id="messages"><%=formMessages%><%
if (importMessages != null) {
%><%=importMessages%><%
}
%></div>
<c:if test="${book.notEmpty}">
<div id="filter">
<c:if test="${book.hasFilter}">
<span><%=intl._t("Current filter")%>: <b>${book.filter}</b>
@ -287,10 +297,12 @@ ${book.loadBookMessages}
</table>
<p class="buttons" id="addnewaddrbutton">
<input class="cancel" type="reset" value="<%=intl._t("Cancel")%>" >
<c:if test="${book.notEmpty}">
<input class="accept" type="submit" name="action" value="<%=intl._t("Replace")%>" >
<% if (!book.getBook().equals("published")) { %>
<input class="add" type="submit" name="action" value="<%=intl._t("Add Alternate")%>" >
<% } %>
</c:if><% /* book.notEmpty */ %>
<input class="add" type="submit" name="action" value="<%=intl._t("Add")%>" >
</p>
</div>

View File

@ -1,3 +1,36 @@
2022-09-06 zzz
* NetDB: Fix reseeding when clock is skewed
* SSU2: Don't publish or connect if our MTU becomes too small
2022-09-04 zzz
* SusiDNS: Fix adding to empty address book
2022-09-03 zzz
* NetDB: Query connected peers for their RI directly
* UPnP: Fix opening IPv6 ports
2022-09-01 zzz
* Router: Ensure database store message is processed before reply job (Gitlab #364)
2022-08-29 zzz
* SSU2: Implement ack-immediate flag
2022-08-28 zzz
* Console:
- Add notification and summary bar info on deadlock
- Linkify router hash even if not in netdb
* Util: Add option to gzip router logs
2022-08-25 zzz
* Router: Fix deadlock via rebuildRouterAddress() and UDPTransport
* SSU2:
- Implement path challenge and connection migration
- Fix packets exceeding MTU by up to 3 bytes
- Immediately fail session request containing zero token
2022-08-23 zzz
* Router: Add deadlocks to event log
2022-08-22 1.9.0 released
2022-08-10 zzz

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Git";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 0;
public final static long BUILD = 7;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -366,7 +366,7 @@ public class PersistentDataStore extends TransientDataStore {
requeue(READ_DELAY);
return;
}
long now = getContext().clock().now();
long now = System.currentTimeMillis();
// check directory mod time to save a lot of object churn in scanning all the file names
long lastMod = _dbDir.lastModified();
// if size() (= RI + LS) is too low, call anyway to check for reseed