actually fixes issue 2
This commit is contained in:
@@ -10,7 +10,7 @@ backup=(etc/pkgstash/pkgstash.toml etc/pkgstash/pkgstash.env)
|
|||||||
license=(GPL-2.0-only)
|
license=(GPL-2.0-only)
|
||||||
install=pkgstash.install
|
install=pkgstash.install
|
||||||
source=("https://github.com/ewpt3ch/${pkgname}/releases/download/v${pkgver}/pkgstash-v${pkgver}-$CARCH.tar.gz")
|
source=("https://github.com/ewpt3ch/${pkgname}/releases/download/v${pkgver}/pkgstash-v${pkgver}-$CARCH.tar.gz")
|
||||||
sha256sums=('ccad5b513ed37b5c626c74f783127f2fb468b53080fc6deb3e4e44e1e7e99e99')
|
sha256sums=('e1eed03e58259f037c71459f729b6544ff02264dc7243107bc9b0ed25b854e28')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd deploy
|
cd deploy
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ func (c *Config) loadToken(path string) error {
|
|||||||
return fmt.Errorf("failed to stat env file: %v", err)
|
return fmt.Errorf("failed to stat env file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if info.Mode().Perm() != 0600 {
|
if info.Mode().Perm() != 0640 {
|
||||||
return fmt.Errorf("env file perms not secure, expected 0600 got %o", info.Mode().Perm())
|
return fmt.Errorf("env file perms not secure, expected 0600 got %o", info.Mode().Perm())
|
||||||
}
|
}
|
||||||
//#nosec G304 -- config is known path
|
//#nosec G304 -- config is known path
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ func defaultCfgMap() map[string]string {
|
|||||||
|
|
||||||
func TestReadConfig(t *testing.T) {
|
func TestReadConfig(t *testing.T) {
|
||||||
cfgMap := defaultCfgMap()
|
cfgMap := defaultCfgMap()
|
||||||
path := writeConfigFiles(t, cfgMap, 0600)
|
path := writeConfigFiles(t, cfgMap, 0640)
|
||||||
|
|
||||||
cfg, err := ReadConfig(path)
|
cfg, err := ReadConfig(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user