bin/83277: libfetch includes the leading / in FTP URL paths

John Baldwin jhb at FreeBSD.org
Mon Jul 11 18:00:30 GMT 2005


>Number:         83277
>Category:       bin
>Synopsis:       libfetch includes the leading / in FTP URL paths
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 11 18:00:29 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     John Baldwin
>Release:        4.8-RELEASE
>Organization:
>Environment:
>Description:
RFC 1738 specifies that the '/' character separating the hostname from the url-path in a FTP url is a separator and should not be treated as a part of the url-path.  Thus, ftp://foobar/baz/blah should retrieve the file 'baz/blah', but instead it tries to retrieve the file '/baz/blah'.      
>How-To-Repeat:
> fetch -vv ftp://yyy:zzz@xxx/foo/bar/baz
scheme:   [ftp]
user:     [yyy]
password: [zzz]
host:     [xxx]
port:     [0]
document: [/foo/bar/baz]
---> xxx:21
looking up xxx
connecting to xxx:21
<<< 220 xxx FTP server (Version 6.00LS) ready.
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:
 >>> USER yyy
 <<< 331 Password required for yyy.
 >>> PASS zzz
 <<< 230 User yyy logged in.
 >>> TYPE I
 <<< 200 Type set to I.
 >>> CWD /foo/bar
 <<< 550 /foo/bar: No such file or directory.
 fetch: ftp://yyy:zzz@xxx/foo/bar/baz: File unavailable (e.g., file not found, no access)
 


More information about the freebsd-bugs mailing list