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:
EhsanParsania
2024-03-01 21:07:07 +03:30
committed by GitHub
parent 5452c8f41f
commit a7b5b38418
2 changed files with 30 additions and 16 deletions

View File

@@ -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) {