diff --git a/src/web/middleware/ipsessioncookie.js b/src/web/middleware/ipsessioncookie.js index c2cd849b..e74b1f55 100644 --- a/src/web/middleware/ipsessioncookie.js +++ b/src/web/middleware/ipsessioncookie.js @@ -9,7 +9,7 @@ try { SALT = require(SALT_PATH); } catch (error) { SALT = crypto.randomBytes(32).toString('base64'); - fs.writeFileSync(SALT_PATH, SALT); + fs.writeFileSync(SALT_PATH, JSON.stringify(SALT)); } function sha256(input) {