Skip to content

Commit 3b0ab80

Browse files
committed
Require masterKey when performing config updates
1 parent 6fe050b commit 3b0ab80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

global_config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ var router = new PromiseRouter();
88

99
// Returns a promise for a {response} object.
1010
function handleUpdateGlobalConfig(req) {
11+
if (!req.auth.isMaster) {
12+
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, 'Config updates requires valid masterKey.');
13+
}
14+
1115
return rest.update(req.config, req.auth,
1216
'_GlobalConfig', 1, req.body)
1317
.then((response) => {

0 commit comments

Comments
 (0)