add support for anonymous users

Fixes #935

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-07-27 18:54:25 +02:00
parent e3c5cf981f
commit ef0a3bc571
18 changed files with 723 additions and 52 deletions

View File

@@ -232,6 +232,8 @@ func (s *Server) PreAuthUser(cc ftpserver.ClientContext, username string) error
return nil
}
if _, ok := err.(*util.RecordNotFoundError); !ok {
logger.Error(logSender, fmt.Sprintf("%v_%v_%v", common.ProtocolFTP, s.ID, cc.ID()),
"unable to get user on pre auth: %v", err)
return common.ErrInternalFailure
}
}