Skip to content

Commit cb4b60c

Browse files
authored
Merge pull request #65 from back4app/hide-master-key
Hide master key
2 parents 359b520 + faf1b74 commit cb4b60c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Parse-Dashboard/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module.exports = function(config, options) {
8585

8686
// Serve the configuration.
8787
app.get('/parse-dashboard-config.json', function(req, res) {
88-
let apps = config.apps.map((app) => Object.assign({}, app)); // make a copy
88+
let apps = config.apps.map((app) => Object.assign({ masterKey: "******" }, app)); // make a copy
8989
let response = {
9090
apps: apps,
9191
newFeaturesInLatestVersion: newFeaturesInLatestVersion,

src/dashboard/Dashboard.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ class Dashboard extends React.Component {
138138
AccountManager.setCurrentUser({ user });
139139
this.setState({ newFeaturesInLatestVersion });
140140
let appInfoPromises = apps.map(app => {
141+
// Set master key as a default string to avoid undefined value access issues
142+
if (!app.masterKey) app.masterKey = "******"
141143
if (app.serverURL.startsWith('https://api.parse.com/1')) {
142144
//api.parse.com doesn't have feature availability endpoint, fortunately we know which features
143145
//it supports and can hard code them

0 commit comments

Comments
 (0)