permission fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ycc 2024-01-05 17:01:36 +01:00
parent 379b40b2fb
commit a9f3b548e5
2 changed files with 9 additions and 7 deletions

View File

@ -8,8 +8,10 @@ import (
type Config struct {
// UserConfig
SavePassword bool `json:"save_password,omitempty"`
SavedPassword string `json:"saved_password,omitempty"`
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
}

View File

@ -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
}