sftp bugs

Jan Hudec bulb at ucw.cz
Wed Nov 30 10:50:01 GMT 2005


On Wed, Nov 30, 2005 at 18:37:14 +0800, James Henstridge wrote:
> Jan Hudec wrote:
> >On Wed, Nov 30, 2005 at 09:33:36 +0800, James Henstridge wrote:
> >>I think the URL handling fixes in the patch I posted yesterday should
> >>fix this problem.
> >>
> >>Removing multiple slashes is not necessarily correct though, since the
> >>SFTP URI spec is a bit weird: "sftp://localhost/tmp" refers to "~/tmp",
> >>while "sftp://localhost/%2Ftmp" refers to "/tmp".
> >>
> >>It doesn't say how "sftp://localhost//tmp" should be interpreted
> >>    
> >>
> >
> >If I read it correctly, it said it's illegal.
> >  
> >
> I'm not sure if that is illegal.  The sftp URI draft spec
> (http://www.ietf.org/internet-drafts/draft-ietf-secsh-scp-sftp-ssh-uri-03.txt)
> references RFC 3986, which states that the path component can not begin
> with two slashes if there is no authority component.  SFTP URIs have a
> path component, so that restriction doesn't appear to be valid.

Well, it's not entirely clear about it, but I was refering to the
following:

[...] Paths starting with any other character are relative to the user's
home or default directory. Note that the characters "/" and ";" are
reserved and must be encoded. [...]

So in the end it depends on whether RFC3629 considers // equal to / or
not. But I'd rather see // mean absolute path nevertheless as it seems a
bit more usable.

> Furthermore, the BNF in the RFC seems to allow the slash to remain
> unescaped.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051130/66ef6859/attachment.pgp 


More information about the bazaar mailing list