Browse Source

Tighten permissions on auto-generated config file

pull/26/head
Starbeamrainbowlabs 4 years ago
parent
commit
2787ea7c4c
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 5
      lib/SBRL/TomlConfig.php

5
lib/SBRL/TomlConfig.php

@ -10,10 +10,12 @@ use \Yosymfony\Toml\TomlBuilder; @@ -10,10 +10,12 @@ use \Yosymfony\Toml\TomlBuilder;
* Handles the loading and saving of settings from a toml file.
* Supports loading default settings from a separate file.
* @author Starbeamrainbowlabs
* @version v0.5.1
* @version v0.5.2
* @lastModified 22nd March 2017
* @license https://www.mozilla.org/en-US/MPL/2.0/ Mozilla Public License 2.0
* Changelog:
* v0.5.2 - 15th January 2018
* chmod auto-generated settings file to be 0600
* v0.5.1 - 14th January 2018
* Make auto-generated settings files valid
* v0.5 - 9th September 2018
@ -61,6 +63,7 @@ class TomlConfig @@ -61,6 +63,7 @@ class TomlConfig
} else {
mkdir(dirname($settingsFilePath), 0750, true);
file_put_contents($settingsFilePath, "$this->customSettingsBanner\n");
chmod($settingsFilePath, 0600);
}
}
/**

Loading…
Cancel
Save