mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
fix a possible nil pointer dereference
it can happen by upgrading from very old versions
This commit is contained in:
@@ -293,6 +293,11 @@ func (a *Admin) HideConfidentialData() {
|
||||
if a.Filters.TOTPConfig.Secret != nil {
|
||||
a.Filters.TOTPConfig.Secret.Hide()
|
||||
}
|
||||
for _, code := range a.Filters.RecoveryCodes {
|
||||
if code.Secret != nil {
|
||||
code.Secret.Hide()
|
||||
}
|
||||
}
|
||||
a.SetNilSecretsIfEmpty()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user