Skip to content

Commit

Permalink
Use -1 to disable key algorithm type in ssh.minimum_key_sizes (#11635) (
Browse files Browse the repository at this point in the history
#11662)

Backport #11635

Fix #11634

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
zeripath and techknowlogick committed May 28, 2020
1 parent 762c046 commit 0c40b0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/setting/setting.go
Expand Up @@ -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)
Expand Down

0 comments on commit 0c40b0b

Please sign in to comment.