This commit is contained in:
parent
379b40b2fb
commit
a9f3b548e5
@ -10,6 +10,8 @@ type Config struct {
|
||||
// UserConfig
|
||||
SavePassword bool `json:"save_password,omitempty"`
|
||||
SavedPassword string `json:"saved_password,omitempty"`
|
||||
PasswordTip string `json:"password_tip,omitempty"`
|
||||
PasswordTipUnlock string `json:"password_tip_unlock,omitempty"`
|
||||
// Technical
|
||||
IdentityFile string `json:"identity_file,omitempty"`
|
||||
StoragePath string `json:"storage_path,omitempty"`
|
||||
@ -42,9 +44,9 @@ type Config struct {
|
||||
DbSuffix string `json:"db_suffix,omitempty"`
|
||||
|
||||
// Inner
|
||||
memoryPassword string `json:"memory_password,omitempty"`
|
||||
additionalPasswords []string `json:"additional_passwords,omitempty"`
|
||||
me *Identity `json:"me,omitempty"`
|
||||
memoryPassword string
|
||||
additionalPasswords []string
|
||||
me *Identity
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
@ -74,7 +76,7 @@ func (c *Config) Save(filename string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
os.WriteFile(filename, data, 0644)
|
||||
os.WriteFile(filename, data, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ func (id *Identity) Save(file string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = os.WriteFile(file, []byte(armor), 0644)
|
||||
err = os.WriteFile(file, []byte(armor), 0600)
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user