mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
ftpd: add some security checks
This commit is contained in:
@@ -226,16 +226,14 @@ func (c *Configuration) Initialize(configDir string) error {
|
||||
return
|
||||
}
|
||||
|
||||
if binding.ApplyProxyConfig {
|
||||
if binding.ApplyProxyConfig && common.Config.ProxyProtocol > 0 {
|
||||
proxyListener, err := common.Config.GetProxyListener(listener)
|
||||
if err != nil {
|
||||
logger.Warn(logSender, "", "error enabling proxy listener: %v", err)
|
||||
exitChannel <- err
|
||||
return
|
||||
}
|
||||
if proxyListener != nil {
|
||||
listener = proxyListener
|
||||
}
|
||||
listener = proxyListener
|
||||
}
|
||||
|
||||
exitChannel <- c.serve(listener, serverConfig)
|
||||
|
||||
Reference in New Issue
Block a user