mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 11:33:55 +01:00
Use -1 to disable key algorithm type in ssh.minimum_key_sizes (#11635)
Fix #11634 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
cd5b0e262e
commit
3aedc795c4
1 changed files with 2 additions and 0 deletions
|
@ -730,6 +730,8 @@ func NewContext() {
|
||||||
for _, key := range minimumKeySizes {
|
for _, key := range minimumKeySizes {
|
||||||
if key.MustInt() != -1 {
|
if key.MustInt() != -1 {
|
||||||
SSH.MinimumKeySizes[strings.ToLower(key.Name())] = key.MustInt()
|
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)
|
SSH.AuthorizedKeysBackup = sec.Key("SSH_AUTHORIZED_KEYS_BACKUP").MustBool(true)
|
||||||
|
|
Loading…
Reference in a new issue