mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
ssh: remove the ability to fully customize the software version
many clients rely on the version string to enable/disable some features. We only allow to hide the version number, clients must be able to reliably identify SFTPGo Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -58,7 +58,6 @@ const (
|
||||
|
||||
var (
|
||||
globalConf globalConfig
|
||||
defaultSFTPDBanner = fmt.Sprintf("SFTPGo_%v", version.Get().Version)
|
||||
defaultFTPDBanner = fmt.Sprintf("SFTPGo %v ready", version.Get().Version)
|
||||
defaultInstallCodeHint = "Installation code"
|
||||
defaultSFTPDBinding = sftpd.Binding{
|
||||
@@ -255,7 +254,7 @@ func Init() {
|
||||
SFTPD: sftpd.Configuration{
|
||||
Bindings: []sftpd.Binding{defaultSFTPDBinding},
|
||||
MaxAuthTries: 0,
|
||||
Banner: defaultSFTPDBanner,
|
||||
Banner: "",
|
||||
HostKeys: []string{},
|
||||
HostCertificates: []string{},
|
||||
HostKeyAlgorithms: []string{},
|
||||
@@ -761,9 +760,6 @@ func isExternalAuthScopeValid() bool {
|
||||
}
|
||||
|
||||
func resetInvalidConfigs() {
|
||||
if strings.TrimSpace(globalConf.SFTPD.Banner) == "" {
|
||||
globalConf.SFTPD.Banner = defaultSFTPDBanner
|
||||
}
|
||||
if strings.TrimSpace(globalConf.FTPD.Banner) == "" {
|
||||
globalConf.FTPD.Banner = defaultFTPDBanner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user