I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Verified Commit 2ceb9c42 authored by zzz's avatar zzz
Browse files

Console: Add tunnel nicknames to router debug page

Escape tunnel nicknames on LS debug page
parent 0b59f53f
No related branches found
No related tags found
No related merge requests found
...@@ -519,7 +519,7 @@ class NetDbRenderer { ...@@ -519,7 +519,7 @@ class NetDbRenderer {
buf.append("<b>").append(_t("Destination")).append(":</b> "); buf.append("<b>").append(_t("Destination")).append(":</b> ");
TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(key); TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(key);
if (in != null && in.getDestinationNickname() != null) if (in != null && in.getDestinationNickname() != null)
buf.append(in.getDestinationNickname()); buf.append(DataHelper.escapeHTML(in.getDestinationNickname()));
else else
buf.append(dest.toBase64().substring(0, 6)); buf.append(dest.toBase64().substring(0, 6));
buf.append("</th></tr>\n"); buf.append("</th></tr>\n");
......
...@@ -76,8 +76,18 @@ ...@@ -76,8 +76,18 @@
net.i2p.data.Hash h = dest.calculateHash(); net.i2p.data.Hash h = dest.calculateHash();
net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h); net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h);
if (skm != null) { if (skm != null) {
out.print("<div class=\"debug_section\" id=\"cskm" + (i++) + "\">"); out.print("<div class=\"debug_section\" id=\"cskm" + (i++) + "\"><h2>");
out.print("<h2><font size=\"-2\">" + dest.toBase32() + "</font> Session Key Manager</h2>"); net.i2p.router.TunnelPoolSettings tps = ctx.tunnelManager().getInboundSettings(h);
if (tps != null) {
String nick = tps.getDestinationNickname();
if (nick != null)
out.print(net.i2p.data.DataHelper.escapeHTML(nick));
else
out.print("<font size=\"-2\">" + dest.toBase32() + "</font>");
} else {
out.print("<font size=\"-2\">" + dest.toBase32() + "</font>");
}
out.print(" Session Key Manager</h2>");
skm.renderStatusHTML(out); skm.renderStatusHTML(out);
out.print("</div>"); out.print("</div>");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment