From 2787ea7c4c7fd6a579899dfc0fa3d78c8c30b84a Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 15 Jan 2019 16:42:12 +0000 Subject: [PATCH] Tighten permissions on auto-generated config file --- lib/SBRL/TomlConfig.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/SBRL/TomlConfig.php b/lib/SBRL/TomlConfig.php index cca7b45..874e511 100644 --- a/lib/SBRL/TomlConfig.php +++ b/lib/SBRL/TomlConfig.php @@ -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 } else { mkdir(dirname($settingsFilePath), 0750, true); file_put_contents($settingsFilePath, "$this->customSettingsBanner\n"); + chmod($settingsFilePath, 0600); } } /**