Skip to content

Commit feb89f0

Browse files
authored
Merge pull request #684 from hackmdio/fixDropboxAppKey
Fix not passing app key correctly in dropbox config ⚠️ Dropbox ClientSecret was leaked ⚠️ Fixes #683
2 parents d492070 + 6080087 commit feb89f0

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var data = {
3434
version: config.version,
3535
GOOGLE_API_KEY: config.google.clientSecret,
3636
GOOGLE_CLIENT_ID: config.google.clientID,
37-
DROPBOX_APP_KEY: config.dropbox.clientSecret
37+
DROPBOX_APP_KEY: config.dropbox.appKey
3838
}
3939

4040
ejs.renderFile(constpath, data, {}, function (err, str) {

lib/config/default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ module.exports = {
8181
},
8282
dropbox: {
8383
clientID: undefined,
84-
clientSecret: undefined
84+
clientSecret: undefined,
85+
appKey: undefined
8586
},
8687
google: {
8788
clientID: undefined,

lib/config/dockerSecret.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ if (fs.existsSync(basePath)) {
4444
},
4545
dropbox: {
4646
clientID: getSecret('dropbox_clientID'),
47-
clientSecret: getSecret('dropbox_clientSecret')
47+
clientSecret: getSecret('dropbox_clientSecret'),
48+
appKey: getSecret('dropbox_appKey')
4849
},
4950
google: {
5051
clientID: getSecret('google_clientID'),

lib/config/environment.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ module.exports = {
5656
},
5757
dropbox: {
5858
clientID: process.env.HMD_DROPBOX_CLIENTID,
59-
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
59+
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET,
60+
appKey: process.env.HMD_DROPBOX_APPKEY
6061
},
6162
google: {
6263
clientID: process.env.HMD_GOOGLE_CLIENTID,

0 commit comments

Comments
 (0)