Skip to content

Commit ef86bf5

Browse files
committed
Use API key instead of clientSecret
As recently discovered we send the clientSecret to the webclient which is potentionally dangerous. This patch should fix the problem and replace the clientSecret with the originally intended and correct way to implement it using the API key. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
1 parent f23f403 commit ef86bf5

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var data = {
3333
urlpath: config.urlPath,
3434
debug: config.debug,
3535
version: config.version,
36-
GOOGLE_API_KEY: config.google.clientSecret,
36+
GOOGLE_API_KEY: config.google.apiKey,
3737
GOOGLE_CLIENT_ID: config.google.clientID,
3838
DROPBOX_APP_KEY: config.dropbox.appKey,
3939
allowedUploadMimeTypes: config.allowedUploadMimeTypes

lib/config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ module.exports = {
104104
appKey: undefined
105105
},
106106
google: {
107+
apiKey: undefined,
107108
clientID: undefined,
108109
clientSecret: undefined
109110
},

lib/config/environment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module.exports = {
7474
appKey: process.env.HMD_DROPBOX_APPKEY
7575
},
7676
google: {
77+
apiKey: process.env.HMD_GOOGLE_APIKEY,
7778
clientID: process.env.HMD_GOOGLE_CLIENTID,
7879
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET
7980
},

0 commit comments

Comments
 (0)