mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-18 01:03:25 +00:00
Don't save passwords from env/pref to keyring
This commit is contained in:
@@ -199,7 +199,9 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
|
||||
if username != "" {
|
||||
username = username[:len(username) - 1]
|
||||
}
|
||||
keyFile := GetPasswordFromPreference(preference, "ssh_key_file")
|
||||
|
||||
// If ssh_key_file is set, skip password-based login
|
||||
keyFile := GetPasswordFromPreference(preference, "ssh_key_file")
|
||||
|
||||
password := ""
|
||||
passwordCallback := func() (string, error) {
|
||||
@@ -281,10 +283,10 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
|
||||
keyFileAuthMethods := [] ssh.AuthMethod {
|
||||
ssh.PublicKeysCallback(publicKeysCallback),
|
||||
}
|
||||
if keyFile!="" {
|
||||
authMethods = append(keyFileAuthMethods,passwordAuthMethods...)
|
||||
if keyFile != "" {
|
||||
authMethods = append(keyFileAuthMethods, passwordAuthMethods...)
|
||||
} else {
|
||||
authMethods = append(passwordAuthMethods,keyFileAuthMethods...)
|
||||
authMethods = append(passwordAuthMethods, keyFileAuthMethods...)
|
||||
}
|
||||
|
||||
if RunInBackground {
|
||||
|
||||
Reference in New Issue
Block a user