Closed
Bug 66873
Opened 25 years ago
Closed 25 years ago
SYST error handling
Categories
(Core Graveyard :: Networking: FTP, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: dougt, Assigned: dougt)
Details
Attachments
(3 files)
|
763 bytes,
patch
|
Details | Diff | Splinter Review | |
|
1.63 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.05 KB,
patch
|
Details | Diff | Splinter Review |
FROM EMAIL:
Since the release of Netscape 6, we've been receiving complaints from our
customers that Netscape users cannot access WFTPD servers. We can
reproduce, but not explain, the problem. It seems that Netscape sends a
PASV command, to which WFTPD responds correctly, and listens on the correct
port. But then Netscape doesn't ever seem to open the connection. I've
even run a network monitor on the transaction, and it's clear that Netscape
isn't sending even the first SYN.
Do you have an example server adress to test? I like to take a look with a
protocol analyser.
| Assignee | ||
Comment 2•25 years ago
|
||
You can download their server here:
http://www.wftpd.com
Does this happen with just Windows clients or does it occur with Linux clients?
There are some broken firewalls out there that screw up replies to PASV requests
under certain circumstances. The packets have bad checksums so, on Linux at least, they
never get to the client.
Comment 4•25 years ago
|
||
I've personally only tested it between two Windows machines. Note - there is
no firewall present, no filtering, no NAT - just a hub, and two 10BaseT cables,
between the two computers. The network monitor showed that the PASV command
was sent, and received, appropriately, but that Netscape didn't try the
connection. WFTPD is small - download it and try it.
Do you know if the packet actually made it to the client? A network sniffer may
show a packet arriving but the system may drop it on the floor.
| Assignee | ||
Comment 6•25 years ago
|
||
lets stop guessing as to what it can be and lets get a trace of exactly what
is happening. I hope to do this in the next week or so. If you want to get a
jump on this, enable nspr logging in a debug build (not sure if it works in a
opt build anymore):
set NSPR_LOG_MODULES=nsFTPProtocol:5
set NSPR_LOG_FILE=nspr.log
and attach this log. It should be fairly easy to see what is happening.
| Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → mozilla0.9
Comment 7•25 years ago
|
||
Okay - did that.
Here's what would appear to be the salient part of the log, suggesting that the
problem is in "trying to send" the NLST command (which _does_ make it to the
server and get responded to):
1292[ec98f8]: 2986de0 Writing "CWD /
"
1292[ec98f8]: SUCCEEDED
1292[ec98f8]: 2986de0 Process() - READ_BUF - read "250 "/" is current directory
" (30 bytes)
1292[ec98f8]: 2986de0 Process() - S_LIST -
1292[ec98f8]: 2986de0 Writing "NLST
"
1292[ec98f8]: FAILED
1292[ec98f8]: 2986de0 Process() - ERROR
1292[ec98f8]: ~nsFtpConnectionThread() for ftp://localhost/
I did test this on a WinNT4 system with build 2001021206 and did
ftp://[ipnumber], so both WFTPD and Mozilla are installed on the same system.
Direct after typing ftp://[ipnumber] the CPU % hogs up to 100% but WSFTP Pro,
Netscape 4.76, Netscape 6.0 and MSIE worked fine here.
I did this basic test first to make sure that no other network related problems
are causing this strange behavior.
Doug, did you change anything ftp related after build 2001021206?
| Assignee | ||
Comment 9•25 years ago
|
||
the 100% peg is another bug which will be fixed when I land a branch later this
week.
We are probably messing up the parse of the SYST response. We basically have to
get the server's response when we issue the SYST command. Right now the parsing
is quite weak.
| Assignee | ||
Comment 10•25 years ago
|
||
From rfc959:
SYSTEM (SYST)
This command is used to find out the type of operating system at the server.
The reply shall have as its first word one of the system names listed in the
current version of the Assigned Numbers document [4].
In RFC 1700, "WIN32" is the proper string to be checking for if we are
interested in a windows OS based ftp server.
In the current impl, we were looking for "windows" case insensitive.
I will attach a patch which fixes this.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 11•25 years ago
|
||
| Assignee | ||
Comment 12•25 years ago
|
||
Comment 14•25 years ago
|
||
regarding the SYST parsing. you're negating the possibility of "windows" being
in the string. shouldn't that be a if "windows" || "WIN32" ?
| Assignee | ||
Comment 15•25 years ago
|
||
Right. That was the intent. According to the rfc's, checking for WIN32 is all
we should have to do. Do you know if there are dumb windows ftp services that
doesn't respond correctly to the SYST command?
Comment 16•25 years ago
|
||
you know better than that :-).
a) never use the acronym "RFC" in the context of FTP ;-)
b) yes, there are servers that spit back "windows". Let's just do a case
in-sensative compare for "win" in the string. If that doesn't work, then lest do
the if "windows" || "WIN32"
Comment 17•25 years ago
|
||
Regardless - this bug was presumably caused by a lack of a "default" item for
when the SYST response gives something you aren't expecting. This time it's
WFTPD - what happens next time you run up against a server whose SYST response
isn't one that you've coded for? A good solution would at least do _something_
in such a case, and assuming Unix-style is perhaps the most likely thing to
work.
| Assignee | ||
Comment 18•25 years ago
|
||
if don't know how to handle it, maybe the correct thing to do is to alert the
user that the service is not supported.
| Assignee | ||
Comment 19•25 years ago
|
||
| Assignee | ||
Comment 20•25 years ago
|
||
got a r=gagan.
mscott, can you review?
Comment 21•25 years ago
|
||
sr=mscott
| Assignee | ||
Comment 22•25 years ago
|
||
thanks. Fixed checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 23•24 years ago
|
||
So I should be checking against UNIX and Windows, and failing gracefully against
VMS?
Anyone have sample URL's to these servers?
Keywords: verifyme
Summary: WFTPD incompatibility → SYST handling improvements
Comment 24•23 years ago
|
||
VERIFIED:
functional test shows this to be consistent across Mac OS X+9, Win32, and Linux.
Reopen if I missed anything.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Summary: SYST handling improvements → SYST error handling
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•