diff options
author | zeripath <art27@cantab.net> | 2020-05-28 14:29:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 16:29:15 +0300 |
commit | 3aedc795c4be04254e3400ea1ee85e1fd48ed55a (patch) | |
tree | c80eec5d09828b1e1377899074eaa06aed11e5f1 /modules/setting/setting.go | |
parent | cd5b0e262e0744c3664b338cd7623081737f9ae6 (diff) | |
download | gitea-3aedc795c4be04254e3400ea1ee85e1fd48ed55a.tar.gz gitea-3aedc795c4be04254e3400ea1ee85e1fd48ed55a.zip |
Use -1 to disable key algorithm type in ssh.minimum_key_sizes (#11635)
Fix #11634
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index b8ec957535..f4ec19387b 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) |