Merge pull request #684 from hackmdio/fixDropboxAppKey

Fix not passing app key correctly in dropbox config

⚠️ Dropbox ClientSecret was leaked  ⚠️ 

Fixes #683
This commit is contained in:
Christoph (Sheogorath) Kern 2018-01-19 14:31:04 +01:00 committed by GitHub
commit feb89f02e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

2
app.js
View File

@ -34,7 +34,7 @@ var data = {
version: config.version,
GOOGLE_API_KEY: config.google.clientSecret,
GOOGLE_CLIENT_ID: config.google.clientID,
DROPBOX_APP_KEY: config.dropbox.clientSecret
DROPBOX_APP_KEY: config.dropbox.appKey
}
ejs.renderFile(constpath, data, {}, function (err, str) {

View File

@ -81,7 +81,8 @@ module.exports = {
},
dropbox: {
clientID: undefined,
clientSecret: undefined
clientSecret: undefined,
appKey: undefined
},
google: {
clientID: undefined,

View File

@ -44,7 +44,8 @@ if (fs.existsSync(basePath)) {
},
dropbox: {
clientID: getSecret('dropbox_clientID'),
clientSecret: getSecret('dropbox_clientSecret')
clientSecret: getSecret('dropbox_clientSecret'),
appKey: getSecret('dropbox_appKey')
},
google: {
clientID: getSecret('google_clientID'),

View File

@ -56,7 +56,8 @@ module.exports = {
},
dropbox: {
clientID: process.env.HMD_DROPBOX_CLIENTID,
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET,
appKey: process.env.HMD_DROPBOX_APPKEY
},
google: {
clientID: process.env.HMD_GOOGLE_CLIENTID,