From ecb4e35f4e6c7304cb274593c13cb47fd5078b75 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 30 Jan 2018 13:27:07 +0100 Subject: Add ability to reset our password --- server/initializers/constants.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'server/initializers/constants.ts') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 03828f54f..e7b1656e2 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -65,13 +65,15 @@ const JOB_ATTEMPTS: { [ id in JobType ]: number } = { 'activitypub-http-broadcast': 5, 'activitypub-http-unicast': 5, 'activitypub-http-fetcher': 5, - 'video-file': 1 + 'video-file': 1, + 'email': 5 } const JOB_CONCURRENCY: { [ id in JobType ]: number } = { 'activitypub-http-broadcast': 1, 'activitypub-http-unicast': 5, 'activitypub-http-fetcher': 1, - 'video-file': 1 + 'video-file': 1, + 'email': 5 } // 2 days const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 @@ -95,9 +97,18 @@ const CONFIG = { }, REDIS: { HOSTNAME: config.get('redis.hostname'), - PORT: config.get('redis.port'), + PORT: config.get('redis.port'), AUTH: config.get('redis.auth') }, + SMTP: { + HOSTNAME: config.get('smtp.hostname'), + PORT: config.get('smtp.port'), + USERNAME: config.get('smtp.username'), + PASSWORD: config.get('smtp.password'), + TLS: config.get('smtp.tls'), + CA_FILE: config.get('smtp.ca_file'), + FROM_ADDRESS: config.get('smtp.from_address') + }, STORAGE: { AVATARS_DIR: buildPath(config.get('storage.avatars')), LOG_DIR: buildPath(config.get('storage.logs')), @@ -311,6 +322,8 @@ const PRIVATE_RSA_KEY_SIZE = 2048 // Password encryption const BCRYPT_SALT_SIZE = 10 +const USER_PASSWORD_RESET_LIFETIME = 60000 * 5 // 5 minutes + // --------------------------------------------------------------------------- // Express static paths (router) @@ -408,6 +421,7 @@ export { VIDEO_LICENCES, VIDEO_RATE_TYPES, VIDEO_MIMETYPE_EXT, + USER_PASSWORD_RESET_LIFETIME, AVATAR_MIMETYPE_EXT, SCHEDULER_INTERVAL, JOB_COMPLETED_LIFETIME -- cgit v1.2.3