[Indy] another bugs found and fixed about IdFTPServer

Giganews Newsgroups
Subject: [Indy] another bugs found and fixed about IdFTPServer
Posted by:  Riceball LEE (ricebal…@Hotmail.com)
Date: Mon, 14 Mar 2005

* [Bug] IdFTPServer: CommandPASS forget triggle the
OnLoginSuccessBanner via FUserAccounts:
procedure TIdFTPServer.CommandPASS(ASender: TIdCommand);
      utNormalUser:
      begin
        if Assigned(FUserAccounts) then begin
            ASender.Reply.SetReply(230, RSFTPUserLogged);
            //<------ added here
            if Assigned(OnLoginSuccessBanner) then
            begin
              OnLoginSuccessBanner(LF,ASender.Reply);
              ASender.Reply.NumericCode := 230;
            end;
            //<------ added here end
            LF.FPasswordAttempts:=0;

* [Critical Bug] IdFTPServer: TIdFTPServerContext.ReInitialize forget
call the inherited.
procedure TIdFTPServerContext.ReInitialize;
begin
  //add this line.
  inherited; //if no this line, the user will still be Authenticated
after ReInitialize.
...

Replies