Opened 15 years ago

Closed 15 years ago

#4036 closed Bug report (rejected)

FZ fails to parse trailing / in PWD dir names and strips traling / on CWD

Reported by: handreasson Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc:
Component version: Operating system type: Windows
Operating system version: WinXP SP2

Description

FZ Version: 3.1.5.1
Issue also vitnessed in version 3.1.2, 3.1.5
Issue does not exist in (at least) version 2.2.11

When FTP server return, f.e.,
"257 "9.256/" is current directory." upon FZ issuing command "PWD", FZ fails to parse with (debug) message
"ControlSocket.cpp(356): Failed to parse returned path. caller=0p13482d8".

Also, when I manually type in a directory name with a trailing / in the "Remote site:" field, FZ strips the trailing slash before sending it to the server.
Observable in the message log:
Command: CWD /9.258
And also observable in a Packetcapture.

rgds,
Henrik.

Attachments (1)

Trailing-Slash-Debug.txt (2.7 KB ) - added by handreasson 15 years ago.

Download all attachments as: .zip

Change History (4)

by handreasson, 15 years ago

Attachment: Trailing-Slash-Debug.txt added

comment:1 by Tim Kosse, 15 years ago

Resolution: rejected
Status: newclosed

Broken server. RFC 959 requires that PWD returns the absolute paths. Paths without leading slash are relative paths, not absolute paths.

You have to upgrade to a proper server.

comment:2 by handreasson, 15 years ago

Resolution: rejected
Status: closedreopened

And what about the second issue where FZ strips the trailing slash when I enter a directory like "/directory/" in the "Remote site:" field.
And, If I type in a directory name without leading /, FZ adds a leading / before sending the CWD.
Basically preventing me from entering a relative path.

I agree that the server is not very "standard", it's just that it used to work in v2.x.

Btw, I don't agree that the RFC states that PWD must return an absolute path. For MKD, yes, the RFC states that MKD must return an abolute path in the 257 message, but nothing mentioned in particular for the PWD command (even though it would make absolute sense to print an absolute path).
Not critical as I can work around it by specifying a "Default remote directory" for the site which causes FZ to ignore the missing leading / in the 257 reply to the PWD cmd (however, only if I enter "/" as the default directory as otherwise FZ strips the trailing / ...)

comment:3 by Tim Kosse, 15 years ago

Resolution: rejected
Status: reopenedclosed

And what about the second issue where FZ strips the trailing slash

FZ assumes TVFS compatibility, see RFC 3659. Note that a good server does not care about trailing slashes, it will simply ignore them.

And, If I type in a directory name without leading /, FZ adds a leading / before sending the CWD.

It takes the current directory and changes it according to the relative paths you just entered. Next it sends the new absolute path to the server.
You are the only person having problems with it.

Btw, I don't agree that the RFC states that PWD must return an absolute path

That's why you are wrong. 257 is defined to contain the absolute path. Furthermore, RFC 959 says this:


Essentially because the PWD command returns the same type of

information as the successful MKD command, the successful PWD
command uses the 257 reply code as well.


I have highlighted the important part.

Just get a better server, it is a task of 5 minutes.

Note: See TracTickets for help on using tickets.