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 { type Config struct {
// UserConfig // UserConfig
SavePassword bool `json:"save_password,omitempty"` SavePassword bool `json:"save_password,omitempty"`
SavedPassword string `json:"saved_password,omitempty"` SavedPassword string `json:"saved_password,omitempty"`
PasswordTip string `json:"password_tip,omitempty"`
PasswordTipUnlock string `json:"password_tip_unlock,omitempty"`
// Technical // Technical
IdentityFile string `json:"identity_file,omitempty"` IdentityFile string `json:"identity_file,omitempty"`
StoragePath string `json:"storage_path,omitempty"` StoragePath string `json:"storage_path,omitempty"`
@ -42,9 +44,9 @@ type Config struct {
DbSuffix string `json:"db_suffix,omitempty"` DbSuffix string `json:"db_suffix,omitempty"`
// Inner // Inner
memoryPassword string `json:"memory_password,omitempty"` memoryPassword string
additionalPasswords []string `json:"additional_passwords,omitempty"` additionalPasswords []string
me *Identity `json:"me,omitempty"` me *Identity
} }
var instance *Config var instance *Config
@ -74,7 +76,7 @@ func (c *Config) Save(filename string) error {
if err != nil { if err != nil {
return err return err
} }
os.WriteFile(filename, data, 0644) os.WriteFile(filename, data, 0600)
if err != nil { if err != nil {
return err return err
} }

View File

@ -52,7 +52,7 @@ func (id *Identity) Save(file string) error {
if err != nil { if err != nil {
return err return err
} }
err = os.WriteFile(file, []byte(armor), 0644) err = os.WriteFile(file, []byte(armor), 0600)
return err return err
} }