mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
preserve GCS credentials on update if not set
credentials were not preserved if "prefer_database_credentials" was set to true Fixes #613
This commit is contained in:
@@ -245,7 +245,9 @@ func updateEncryptedSecrets(fsConfig *vfs.Filesystem, currentS3AccessSecret, cur
|
||||
fsConfig.AzBlobConfig.SASURL = currentAzSASUrl
|
||||
}
|
||||
case sdk.GCSFilesystemProvider:
|
||||
if fsConfig.GCSConfig.Credentials.IsNotPlainAndNotEmpty() {
|
||||
// for GCS credentials will be cleared if we enable automatic credentials
|
||||
// so keep the old credentials here if no new credentials are provided
|
||||
if !fsConfig.GCSConfig.Credentials.IsPlain() {
|
||||
fsConfig.GCSConfig.Credentials = currentGCSCredentials
|
||||
}
|
||||
case sdk.CryptedFilesystemProvider:
|
||||
|
||||
Reference in New Issue
Block a user