aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-25 17:57:37 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-25 17:57:37 +0200
commit26d7d31ba3b1d26ea9a51e8626e4a4537867db94 (patch)
tree988da4baa1397aaaf46a3c131918257fee4bc34f /server/initializers
parentf84a89f0e7e9595d2b6f6dd59181c01f562a4239 (diff)
downloadPeerTube-26d7d31ba3b1d26ea9a51e8626e4a4537867db94.tar.gz
PeerTube-26d7d31ba3b1d26ea9a51e8626e4a4537867db94.tar.zst
PeerTube-26d7d31ba3b1d26ea9a51e8626e4a4537867db94.zip
Server: encrypt password in database
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.js3
-rw-r--r--server/initializers/installer.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index ce9f8ad6c..dd4eff493 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -6,6 +6,8 @@ const path = require('path')
6// API version of our pod 6// API version of our pod
7const API_VERSION = 'v1' 7const API_VERSION = 'v1'
8 8
9const BCRYPT_SALT_SIZE = 10
10
9const CONFIG = { 11const CONFIG = {
10 DATABASE: { 12 DATABASE: {
11 DBNAME: 'peertube' + config.get('database.suffix'), 13 DBNAME: 'peertube' + config.get('database.suffix'),
@@ -115,6 +117,7 @@ if (isTestInstance() === true) {
115 117
116module.exports = { 118module.exports = {
117 API_VERSION: API_VERSION, 119 API_VERSION: API_VERSION,
120 BCRYPT_SALT_SIZE: BCRYPT_SALT_SIZE,
118 CONFIG: CONFIG, 121 CONFIG: CONFIG,
119 CONSTRAINTS_FIELDS: CONSTRAINTS_FIELDS, 122 CONSTRAINTS_FIELDS: CONSTRAINTS_FIELDS,
120 FRIEND_SCORE: FRIEND_SCORE, 123 FRIEND_SCORE: FRIEND_SCORE,
diff --git a/server/initializers/installer.js b/server/initializers/installer.js
index c12187871..974402094 100644
--- a/server/initializers/installer.js
+++ b/server/initializers/installer.js
@@ -114,8 +114,8 @@ function createOAuthAdminIfNotExist (callback) {
114 user.save(function (err, createdUser) { 114 user.save(function (err, createdUser) {
115 if (err) return callback(err) 115 if (err) return callback(err)
116 116
117 logger.info('Username: ' + createdUser.username) 117 logger.info('Username: ' + username)
118 logger.info('User password: ' + createdUser.password) 118 logger.info('User password: ' + password)
119 119
120 return callback(null) 120 return callback(null)
121 }) 121 })