#358 closed defect (fixed)

WUI can make an <a href> tag with no contents

Reported by: drewp Owned by:
Priority: minor Milestone: 1.6.0
Component: code-frontend-web Version: 0.9.0
Keywords: Cc:
Launchpad Bug:

Description

I put a file by doing this:

bang(pts/4):~/allmydata-tahoe-0.9.0% bin/tahoe put -u http://10.1.0.1:8123 -d /unsafe/tahoe/pycon /etc/abcde.conf /etc/abcde.conf

and now this directory view: http://127.0.0.1:8123/uri/URI%3ADIR2%3Agb4kveh2zsq4bprwzx3p7vbtq4%3Avd6taniw7nvime4s4ylx3az4mavhgvy5kxmxbtubvytjrcckltia/

contains this invisible link: <td><a href="/uri/URI%3ADIR2%3A3lciitsbt7nho6hyxwq3rve6eq%3Axei7hfd5i42u66g7owwea2md5hhp3bc7jble2tkd476qrc6uhnpa"/></td>

I wish that dir would have a label like "[root]" or something.

(This is on the test grid at pb://bybv6lpnj6doxxa3mtupofooreqv6tpb@207.7.131.41:40264,127.0.0.1:40264/introducer)

Change History (4)

comment:1 Changed at 2008-08-19T18:02:28Z by zooko

  • Component changed from unknown to code-frontend-web
  • Owner nobody deleted

comment:2 Changed at 2009-12-27T17:50:24Z by warner

FYI, this is still a problem. The 'tahoe put' command created a path of (, 'etc', 'abcde.conf'), rooted in the default "tahoe:" alias. The webapi PUT url that gets used is http://NODE/uri/DIRCAP//etc/abcde.conf (note the double-slash).

We've discouraged empty strings as pathname components in lots of other places. Maybe it's time to forbid them in the PUT command. We need to leave the POST?t=delete&name="" command so you can clean up from this sort of thing.

Incidentally, the correct command would be "tahoe put /etc/abcde.conf etc/abcde.conf", which would treat the default "tahoe:" alias as a root directory. So maybe the other fix is to disallow leading slashes after the (possibly implied) alias.

comment:3 Changed at 2009-12-27T17:51:35Z by warner

Oops, didn't preview first and broke the wiki formatting. I meant to say that it created a path of ('', 'etc', 'abcde.conf').

comment:4 Changed at 2009-12-27T20:22:56Z by warner

  • Milestone changed from eventually to 1.6.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed, in 499add09e6b1ba62, with two changes. The first is an internal webapi fix that disallows empty strings as pathname components when traversing directories. The second is a change to the "tahoe put" command that notices when you're trying to do that and tells you to try it without the leading slash instead.

This shouldn't affect the WUI's ability to delete or rename a directory with an empty name (to fix this sort of breakage).

Note: See TracTickets for help on using tickets.