ftp login: log is TLS is enabled

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-05-03 18:47:01 +02:00
parent 92aa89263b
commit 0da12ef47b
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -199,7 +199,8 @@ func (s *Server) AuthUser(cc ftpserver.ClientContext, username, password string)
return nil, err return nil, err
} }
setStartDirectory(user.Filters.StartDirectory, cc) setStartDirectory(user.Filters.StartDirectory, cc)
connection.Log(logger.LevelInfo, "User %q logged in with %q from ip %q", user.Username, loginMethod, ipAddr) connection.Log(logger.LevelInfo, "User %q logged in with %q from ip %q, TLS enabled? %t",
user.Username, loginMethod, ipAddr, cc.HasTLSForControl())
dataprovider.UpdateLastLogin(&user) dataprovider.UpdateLastLogin(&user)
return connection, nil return connection, nil
} }