fix: Deny request if master key is not set in Parse Server option masterKeyIps regardless of ACL and CLP (#8957)
BREAKING CHANGE: A request using the master key will now be rejected as unauthorized if the IP from which the request originates is not set in the Parse Server option `masterKeyIps`, even if the request does not require the master key permission, for example for a public object in a public class class.
This commit is contained in:
@@ -246,6 +246,10 @@ export function handleParseHeaders(req, res, next) {
|
||||
`Request using master key rejected as the request IP address '${clientIp}' is not set in Parse Server option 'masterKeyIps'.`
|
||||
);
|
||||
isMaster = false;
|
||||
const error = new Error();
|
||||
error.status = 403;
|
||||
error.message = `unauthorized`;
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (isMaster) {
|
||||
|
||||
Reference in New Issue
Block a user