mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-06 00:03:38 +00:00
Storage name can't be 'ssh' otherwise the ssh password of the default storage nad the storage password of the 'ssh' storage will share the same keychain entry
This commit is contained in:
@@ -223,6 +223,11 @@ func configRepository(context *cli.Context, init bool) {
|
||||
storageName = context.Args()[0]
|
||||
snapshotID = context.Args()[1]
|
||||
storageURL = context.Args()[2]
|
||||
|
||||
if strings.ToLower(storageName) == "ssh" {
|
||||
duplicacy.LOG_ERROR("PREFERENCE_INVALID", "'%s' is an invalid storage name", storageName)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var repository string
|
||||
|
||||
@@ -74,6 +74,13 @@ func LoadPreferences(repository string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, preference := range Preferences {
|
||||
if strings.ToLower(preference.Name) == "ssh" {
|
||||
LOG_ERROR("PREFERENCE_INVALID", "'%s' is an invalid storage name", preference.Name)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user