HackMD/lib
Sheogorath 3599fb79b4
Automatically generate a session secret if default is used
The session secret is used to sign and authenticate the session cookie
and this way very important for the authentication process.

By default the session secret is set to `secret` and never changes. This
commit will add a generator for a dynamic session secret if it stays
unchanged.

It prevents session hijacking this way and will warn the user about
the missing secret.

This also implies that on a restart without configured session secret
will log out all users. While it may seems annoying, it's for the users
best.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-26 00:36:28 +02:00
..
config Automatically generate a session secret if default is used 2018-03-26 00:36:28 +02:00
migrations Add missing migration for permissions 2018-03-06 16:31:41 +01:00
models Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
ot Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
web Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
workers refactor: Remove require extension filename 2017-05-08 19:29:06 +08:00
csp.js Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
history.js Improve history migration performance 2018-03-10 16:51:00 +08:00
letter-avatars.js Use strict mode in all backend files 2017-03-14 13:02:43 +08:00
logger.js refactor(logger): Refactor logger.js 2017-05-08 19:24:37 +08:00
realtime.js Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
response.js Change config to camel case with backwards compatibility 2018-03-25 19:08:14 +02:00
utils.js switch to __dirname 2017-06-02 11:34:35 +01:00