diff --git a/modules/setting/setting.go b/modules/setting/setting.go index b8ec9575350..f4ec19387b5 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -730,6 +730,8 @@ func NewContext() { for _, key := range minimumKeySizes { if key.MustInt() != -1 { SSH.MinimumKeySizes[strings.ToLower(key.Name())] = key.MustInt() + } else { + delete(SSH.MinimumKeySizes, strings.ToLower(key.Name())) } } SSH.AuthorizedKeysBackup = sec.Key("SSH_AUTHORIZED_KEYS_BACKUP").MustBool(true)