Use -1 to disable key algorithm type in ssh.minimum_key_sizes (#11635) (#11662)

Backport #11635

Fix #11634

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
pull/11670/head
zeripath 5 years ago committed by GitHub
parent 762c0463f4
commit 0c40b0badd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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)

Loading…
Cancel
Save