Opened 9 years ago

Closed 8 years ago

#688 closed enhancement (fixed)

false "add to local addressbook" link in server settings

Reported by: pqbit Owned by: zzz
Priority: minor Milestone: 0.9.13
Component: apps/i2ptunnel Version: 0.9.1
Keywords: Cc: Meeh
Parent Tickets: Sensitive: no


The link is http://localhost:7657/susidns/addressbook.jsp?book=private&hostname=i2p%20webserver, but should contain the hostname (Website name): http://localhost:7657/susidns/addressbook.jsp?book=private&hostname=my-hostname.i2p, because hostnames are added to the private addressbook and not the link name for the router console.


Change History (5)

comment:1 Changed 9 years ago by killyourtv

Type: defectenhancement

I wouldn't classify this as a bug.

  • not all users will want to fill out the "web site name" field (I don't)
  • only the web server tunnel has that as an available field; all other tunnel types need to manually define the hostname in the addressbook.

I've always considered 'add to local addressbook' to be a 'convenience' option to carry-over the base64 key…

comment:2 Changed 9 years ago by Meeh

Cc: Meeh added

If I not misunderstood you, this should fix it.

In file "apps/i2ptunnel/jsp/WEB-INF/classes/net/i2p/i2ptunnel/jsp/"

---     2012-08-11 02:18:09.863060660 +0200
+++ 2012-09-05 06:41:50.961178732 +0200
@@ -231,9 +231,9 @@
       out.write("(<span class=\"accessKey\">L</span>):\n                </label>\n                <textarea rows=\"1\" style=\"height: 3em;\" cols=\"60\" readonly=\"readonly\" id=\"localDestination\" title=\"Read Only: Local Destination (if known)\" wrap=\"off\" spellcheck=\"false\">");
       out.write("</textarea>               \n         ");
- if (!"".equals(editBean.getDestinationBase64(curTunnel))) { 
+ if (!"".equals(editBean.getDestinationBase64(curTunnel))&&!"".equals(editBean.getSpoofedHost(curTunnel))) { 
       out.write("<a href=\"/susidns/addressbook.jsp?book=private&amp;hostname=");
-      out.print(editBean.getTunnelName(curTunnel));
+      out.print(editBean.getSpoofedHost(curTunnel));

comment:3 Changed 8 years ago by str4d

Milestone: 0.9.2

comment:4 Changed 8 years ago by zzz

Milestone: 0.9.13
Owner: set to zzz
Status: newaccepted

Thanks kytv/meeh, I understand the OP now :)

I propose to modify meeh's patch to use the spoofed host if it is defined, otherwise use the tunnel name.

Yes, the tunnel name isn't always acceptable (may not end in .i2p. may have spaces, etc.) but the user has a chance to edit it before saving.

comment:5 Changed 8 years ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.