feat: Restrict use of masterKey to localhost by default (#8281)
BREAKING CHANGE: This release restricts the use of `masterKey` to localhost by default; if you are using Parse Dashboard on a different server to connect to Parse Server you need to add the IP address of the server that hosts Parse Dashboard to this option (#8281)
This commit is contained in:
@@ -435,9 +435,12 @@ export class Config {
|
||||
}
|
||||
|
||||
static validateMasterKeyIps(masterKeyIps) {
|
||||
for (const ip of masterKeyIps) {
|
||||
for (let ip of masterKeyIps) {
|
||||
if (ip.includes('/')) {
|
||||
ip = ip.split('/')[0];
|
||||
}
|
||||
if (!net.isIP(ip)) {
|
||||
throw `Invalid ip in masterKeyIps: ${ip}`;
|
||||
throw `The Parse Server option "masterKeyIps" contains an invalid IP address "${ip}".`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user