Merge pull request #205 from maxpoulin64/I-194

Restrict access to the home directory by default
This commit is contained in:
Jérémie Astori 2016-04-27 02:25:30 -04:00
commit 1150d646cb

View File

@ -15,7 +15,7 @@ if (program.home) {
var config = Helper.HOME + "/config.js"; var config = Helper.HOME + "/config.js";
if (!fs.existsSync(config)) { if (!fs.existsSync(config)) {
mkdirp.sync(Helper.HOME); mkdirp.sync(Helper.HOME, {mode: "0700"});
fs.writeFileSync( fs.writeFileSync(
config, config,
fs.readFileSync(__dirname + "/../../defaults/config.js") fs.readFileSync(__dirname + "/../../defaults/config.js")