Merge pull request #102 from jjshoe/patch-2

physical/file: Sensible permissions on creating a file
This commit is contained in:
Mitchell Hashimoto 2015-04-29 11:29:31 -07:00
commit 06461d1d35

View file

@ -84,7 +84,7 @@ func (b *FileBackend) Put(entry *Entry) error {
}
// JSON encode the entry and write it
f, err := os.Create(filepath.Join(path, key))
f, err := os.OpenFile(filepath.Join(path, key), os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}