[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Net::FTPServer] possible bug: MLST/DirHandle->dir
From: |
Richard Jones |
Subject: |
Re: [Net::FTPServer] possible bug: MLST/DirHandle->dir |
Date: |
Wed, 14 Jan 2004 22:17:16 +0000 |
User-agent: |
Mutt/1.5.4i |
On Wed, Jan 14, 2004 at 11:48:28AM -0600, John Jetmore wrote:
>
> I have a bug and I'm not sure if it is in our site's extensions to
> Net::FTPServer or in the core code, so I thought I'd present the
> situation. In FTPServer.pm, in sub '_MLST_command' are these lines of
> code:
>
> my $fileh = $self->{cwd};
> my $dirh = $fileh->dir;
> my $filename = ".";
>
> Despite the name $fileh, it appears that $self->{cwd} is expected to be a
> DirHandle object. I can't find any copy of DirHandle.pm that defines a
> 'dir' subroutine. Since none of the factor-installed personalities (Full,
> etc) have a DirHandle::dir sub, I believe this is a bug in the core code.
Mmmm this does look like a bug. I wonder if anything actually ever
calls MLST? I certainly haven't used it since I wrote it :-)
> My diagnosis isn't great since I don't even know what FTP client generates
> MLST requests, I just am tracking backwards from errors logged in the
> system's messages log.
>
> In one of our custom personalities I tested this by telneting to port 21,
> logging in and simply typing MLST. As soon as I did I was disconnected
> and an error message was logged on the server:
[...]
> ERROR:
> Jan 14 11:05:15 HOST ftpd[31488]: Can't locate object method "dir" via
> package "Net::FTPServer::WCSLEGACY::DirHandle" (perhaps you forgot to load
> "Net::FTPServer::WCSLEGACY::DirHandle"?) at
> /wcs/lib/perl5/wcs/5.6.1/Net/FTPServer.pm line 6656, <STDIN> line 7.
Yes, this confirms it.
> So I think what I'm saying is that DirHandle needs to have the "dir"
> subroutine defined in all cases, but I'm not 100%. Let me know what you
> think.
I think a better solution might be to fix the core code. How about:
my $dirh = $self->{cwd};
my $filename = ".";
?
Rich.
--
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
http://www.YouUnlimited.co.uk/ - management courses
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Net::FTPServer] possible bug: MLST/DirHandle->dir,
Richard Jones <=