📄 idftpserver.pas
字号:
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence }
{ Team Coherence is Copyright 2002 by Quality Software Components }
{ }
{ For further information / comments, visit our WEB site at }
{ http://www.TeamCoherence.com }
{**********************************************************************}
{}
{ $Log: 11866: IdFTPServer.pas
{
{ Rev 1.141 2004.10.27 9:17:48 AM czhower
{ For TIdStrings
}
{
{ Rev 1.140 10/26/2004 9:40:42 PM JPMugaas
{ Updated ref.
}
{
Rev 1.139 9/15/2004 5:01:00 PM DSiders
Added localization comments.
}
{
{ Rev 1.138 2004.08.13 11:03:22 czhower
{ Removed unused var.
}
{
{ Rev 1.137 7/29/2004 1:33:10 AM JPMugaas
{ Reordered AUTH command values for a new property under development. This
{ should make things more logical.
}
{
Rev 1.136 7/18/2004 3:00:42 PM DSiders
Added localization comments.
}
{
{ Rev 1.135 7/15/2004 1:33:00 AM JPMugaas
{ Bug fix for error 105. I fixed this by changing data channel command
{ processing. If the command is not ABOR or STAT, the command is put into a
{ FIFO queue. After the data channel operation is completed, the commands from
{ the FIFO queue are processed. I have tested FlashFXP 3.0 RC4 and it does
{ worki as expected. The behavior is also the same as what NcFTPD does with a
{ NOOP being sent during a data transfer.
{
{ This may also help with FTP command pipelining as proposed by:
{ http://cr.yp.to/ftp/pipelining.html
{
{ Note that we can not use the regular command handler framework for data
{ channel commands because STAT and ABOR need to be handled IMMEDIATELY.
}
{
{ Rev 1.134 7/13/04 9:08:10 PM RLebeau
{ Renamed OnPASV event to OnPASVBeforeBind and added new OnPASVReply event
}
{
{ Rev 1.133 7/13/04 8:13:56 PM RLebeau
{ Various changed for DefaultDataPort handling
}
{
{ Rev 1.132 7/13/2004 3:34:12 AM JPMugaas
{ CCC command and a few other minor modifications to comply with
{ http://www.ietf.org/internet-drafts/draft-murray-auth-ftp-ssl-14.txt .
{
{ I also fixed a few minor bugs in the help and a problem with some error
{ replies sending an extra 200 after a 5xxx code messing up some clients.
{
{ I also expanded the Security options to selectively disable CCC per user.
{ Some administrators may want to do this for security reasons.
}
{
{ Rev 1.131 7/12/2004 11:46:44 PM JPMugaas
{ Improvement in OPTS MODE Z handling. It will give an error if there's only
{ one param. Params must be in pairs. If no valid parameters are present, we
{ give an error.
{
}
{
{ Rev 1.130 07/07/2004 17:34:38 ANeillans
{ Corrected compile bug.
{ Line 6026,
{ if PosInStrArray(IntToStr(LNoVal),STATES,False)>-1 then
{ Function expected a string, not an integer.
}
{
Rev 1.129 7/6/2004 4:52:16 PM DSiders
Corrected spelling of Challenge in properties, methods, types.
}
{
{ Rev 1.128 6/29/2004 4:09:04 PM JPMugaas
{ OPTS MODE Z now supported as per draft-preston-ftpext-deflate-02.txt. This
{ should keep FTP Voyager 11 happy.
}
{
{ Rev 1.127 6/28/2004 7:23:20 PM JPMugaas
{ Bugfix. An invalid site command would cause no reply to be given. Now a
{ syntax is given in such cases.
}
{
{ Rev 1.126 6/27/2004 1:45:30 AM JPMugaas
{ Can now optionally support LastAccessTime like Smartftp's FTP Server could.
{ I also made the MLST listing object and parser support this as well.
}
{
{ Rev 1.125 6/17/2004 3:56:28 PM JPMugaas
{ Fix for AV that happens after data channel operation.
}
{
{ Rev 1.124 6/16/2004 2:29:32 PM JPMugaas
{ Removed direct access to a FConnection. We now use the Connection property
{ in the TIdContext.
}
{
{ Rev 1.123 6/12/2004 9:05:52 AM JPMugaas
{ Telnet control sequences should now work during a data transfer.
{ Removed HandleTelnetSequences. It was part of a crude workaround which had
{ never works and the matter was fixed in another way.
{ OnCustomDir should now work if the DirStyle is custom.
}
{
Rev 1.122 6/11/2004 9:35:12 AM DSiders
Added "Do not Localize" comments.
}
{
{ Rev 1.121 2004.05.20 11:37:26 AM czhower
{ IdStreamVCL
}
{
{ Rev 1.120 5/16/04 5:30:26 PM RLebeau
{ Added setter methods to the ReplyUnknownSITECommand and SITECommands
{ properties
{
{ Added GetRepliesClass() overrides
}
{
{ Rev 1.119 5/1/2004 1:52:20 PM JPMugaas
{ Updated for PeekBytes API change.
}
{
{ Rev 1.118 4/8/2004 12:19:08 PM JPMugaas
{ Should work with new code.
}
{
{ Rev 1.117 3/3/2004 6:34:46 PM JPMugaas
{ Improved help system.
{ Some manditory (RFC 1123 were rutning syntax errors instead of not
{ implemented.
{ Add some mention of some other RFC 2228 commands for completness. Not that
{ there are not supported or implemented.
}
{
{ Rev 1.116 3/3/2004 6:02:14 AM JPMugaas
{ Command descriptions.
}
{
{ Rev 1.115 3/2/2004 8:13:28 AM JPMugaas
{ Fixup for minor API change.
}
{
{ Rev 1.113 3/1/2004 12:41:40 PM JPMugaas
{ Should compile with new code.
}
{
{ Rev 1.112 2/29/2004 6:02:38 PM JPMugaas
{ Improved bug fix for problem with Telnet sequences not being handled properly
{ in the FTP server. Litteral CR and LF are now handled properly (according to
{ the Telnet Specification).
}
{
{ Rev 1.111 2/25/2004 3:27:04 PM JPMugaas
{ STAT -l now works like a LIST command except that it returns output on the
{ control channel. This is for consistancy with microsoft FTP Service,
{ RaidenFTPD, and a few other servers. FlashFXP can take advantage of this
{ feature as well to gain some efficiency. Note that I do not do not advocate
{ doing this on the FTP client because some servers will act differently than
{ you would assume. I may see about possible options for using STAT -l but I
{ can NOT promise anything.
}
{
{ Rev 1.110 2/17/2004 6:37:28 PM JPMugaas
{ OnPASV event added for people needing to change the IP address or port value
{ in commands such as PASV. This should only be done if you have a compelling
{ reason to do it.
{
{ Note that the IP address parameter can NOT work with EPSV and SPSV because
{ only the port number is returned. The IP address is presumed to be the same
{ one that the host is connecting to.
}
{
{ Rev 1.109 2/17/2004 12:26:06 PM JPMugaas
{ The client now supports MODE Z (deflate) uploads and downloads as specified
{ by http://www.ietf.org/internet-drafts/draft-preston-ftpext-deflate-00.txt
}
{
{ Rev 1.108 2/15/2004 12:11:04 AM JPMugaas
{ SPSV support. SPSV is an old propoal to help FTP support IPv6. This was
{ mentioned at: http://cr.yp.to/ftp/retr.html and is supported by PureFTPD.
}
{
{ Rev 1.107 2/14/2004 10:00:40 PM JPMugaas
{ Both upload and download should now work in MODE Z. Dir already worked
{ properly.
}
{
{ Rev 1.106 2/12/2004 11:34:38 PM JPMugaas
{ FTP Deflate preliminary support. Work still needs to be done for upload and
{ downloading.
}
{
{ Rev 1.105 2004.02.08 3:08:10 PM czhower
{ .Net fix.
}
{
{ Rev 1.104 2004.02.07 5:03:10 PM czhower
{ .net fixes.
}
{
{ Rev 1.103 2004.02.03 5:45:54 PM czhower
{ Name changes
}
{
{ Rev 1.102 1/29/2004 3:15:52 PM JPMugaas
{ Fix for P@SW in InitCommandHandlers used "PASV" isntead of "P@SW". Fixed.
}
{
{ Rev 1.101 1/22/2004 8:29:06 AM JPMugaas
{ Removed Ansi*.
}
{
{ Rev 1.100 1/21/2004 2:34:38 PM JPMugaas
{ Fixed SITE ZONE reply.
{ InitComponent
}
{
{ Rev 1.99 1/19/2004 4:37:02 AM JPMugaas
{ MinutesFromGMT was moved to IdFTPCommon because the client now uses it.
}
{
{ Rev 1.98 1/18/2004 9:19:08 AM JPMugaas
{ P@SW now supported.
{
{ This is necessary as some routers that replace a PASV with a P@SW
{ as part of a misguided attempt to add a feature.
{ A router would do a replacement so a client would think that
{ PASV wasn't supported and then the client would do a PORT command
{ instead. That doesn't happen so this just caused the client not to work.
{
{ See: http://www.gbnetwork.co.uk/smcftpd/
}
{
{ Rev 1.97 1/17/2004 7:40:08 PM JPMugaas
{ MLSD added to FEAT list for consistancy with other FTP servers.
{ Fixed bug that would cause FXP transfers to fail when receiving a PASV.
}
{
{ Rev 1.96 1/16/2004 12:25:06 AM JPMugaas
{ Fixes for MTDM set modified time.
}
{
{ Rev 1.94 1/15/2004 2:36:50 AM JPMugaas
{ XMD5 command support.
{ SITE ZONE command added for FTP Voyager.
{ Minor adjustment in AUTH line in the FEAT response to indicate that we
{ support the AUTH TLS, AUTH TLS-C, AUTH SSL, and AUTH TLS-P explicit TLS
{ commands.
}
{
{ Rev 1.93 1/14/2004 4:11:30 PM JPMugaas
{ CPSV support added. This is like PASV but indicates that we use ssl_connect
{ instead of ssl_accept. CPSV is used in FlashFXP for secure site-to-site file
{ transfers.
}
{
{ Rev 1.92 1/14/2004 12:24:06 PM JPMugaas
{ SSCN Support for secure Site to Site Transfers using SSL.
{
{ SSCN is defined at:
{
{ http://www.raidenftpd.com/kb/kb000000037.htm
}
{
{ Rev 1.91 1/13/2004 6:30:38 AM JPMugaas
{ Numerous bug fixes.
{ Now supports XCWD (a predicessor to CWD).
{ Command Reply for unknown command works again.
{ Started putting some formatting into common routines.
{ CuteFTP goes bonkers with a "215 " reply to SYST command. Now indicate that
{ SYST isn't implemented instead of giving that "215 ". Note that a
{ "CustomSystID" should be provided when DirFormat is ftpdfCustom.
{ If DirFormat is ftpdfCustom and OnListDirectory is provided; MLST, MLSD, and
{ OPTS MLSD will be DISABLED. OnListDirectory is used in the custom format for
{ structed standardized output with the MLSD and MLST commands.
{ A not implemented is now given for some commands.
}
{
{ Rev 1.90 1/5/2004 11:53:00 PM JPMugaas
{ Some messages moved to resource strings. Minor tweeks. EIdException no
{ longer raised.
}
{
{ Rev 1.88 1/4/2004 3:51:32 PM JPMugaas
{ Fixed a CWD bug. The parameter was being ignored.
}
{
{ Rev 1.87 1/3/2004 8:05:18 PM JPMugaas
{ Bug fix: Sometimes, replies will appear twice due to the way functionality
{ was enherited.
}
{
{ Rev 1.86 1/3/2004 5:37:56 PM JPMugaas
{ Changes from Bas:
{
{ added function GetReplyClass, this function returns the class of reply this
{ server class uses, this is because in dotnet there can be no code before the
{ inherited in the constructor ( that is used mow to determine the爎eply class )
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -