#1436 new defect

web interface using wrong address / port number when doing ssh port forwarding

Reported by: T_X Owned by:
Priority: major Milestone: soon
Component: code-frontend-web Version: 1.8.2
Keywords: ssh port forwarding redirect wui Cc:
Launchpad Bug:

Description (last modified by T_X)

I'm running the tahoe-lafs node with

web.port = tcp:3456:interface=127.0.0.1

on a dedicated machine. I'm then using something like

ssh -N -f -L 10000:127.0.0.1:3456 hostname

to set up ssh port forwarding on my laptop to be able to access the web interface. I can then successfully see the web interface at http://127.0.0.1:10000/ from my laptop.

However, the buttons redirect me to invalid addresses, e.g. "http://127.0.0.1:3456/uri/..." instead of keeping port 10000. Tried both the "Create a directory" and the "View!" button.

Change History (2)

comment:1 Changed at 2011-07-19T04:22:21Z by T_X

  • Description modified (diff)

comment:2 Changed at 2011-07-19T16:08:05Z by davidsarah

  • Keywords wui added
  • Milestone changed from undecided to 1.10.0

It would be fairly easy for the web UI to use relative URLs in the HTML it generates. The relevant code seems to be the get_root function in web/common.py. (It is used by DirectoryAsHTML in web/directory.py, and in operations.py and info.py; all these uses would need to be checked.)

Note that we may in future want to use different ports for generated pages and for user files, in order to address WUI same-origin security bugs such as #615. That would make using fully relative URLs more difficult, but let's cross that bridge when we come to it.

Note: See TracTickets for help on using tickets.