fix: Authentication provider credentials are usable across Parse Server apps; fixes security vulnerability [GHSA-837q-jhwx-cmpv](https://github.com/parse-community/parse-server/security/advisories/GHSA-837q-jhwx-cmpv) (#9667)

This commit is contained in:
Manuel
2025-03-21 10:49:09 +01:00
committed by GitHub
parent c56b2c49b2
commit 5ef0440c8e
59 changed files with 5987 additions and 1680 deletions

View File

@@ -20,6 +20,7 @@ import {
SecurityOptions,
} from './Options/Definitions';
import ParseServer from './cloud-code/Parse.Server';
import Deprecator from './Deprecator/Deprecator';
function removeTrailingSlash(str) {
if (!str) {
@@ -84,6 +85,7 @@ export class Config {
pages,
security,
enforcePrivateUsers,
enableInsecureAuthAdapters,
schema,
requestKeywordDenylist,
allowExpiredAuthDataToken,
@@ -129,6 +131,7 @@ export class Config {
this.validateSecurityOptions(security);
this.validateSchemaOptions(schema);
this.validateEnforcePrivateUsers(enforcePrivateUsers);
this.validateEnableInsecureAuthAdapters(enableInsecureAuthAdapters);
this.validateAllowExpiredAuthDataToken(allowExpiredAuthDataToken);
this.validateRequestKeywordDenylist(requestKeywordDenylist);
this.validateRateLimit(rateLimit);
@@ -504,6 +507,15 @@ export class Config {
}
}
static validateEnableInsecureAuthAdapters(enableInsecureAuthAdapters) {
if (enableInsecureAuthAdapters && typeof enableInsecureAuthAdapters !== 'boolean') {
throw 'Parse Server option enableInsecureAuthAdapters must be a boolean.';
}
if (enableInsecureAuthAdapters) {
Deprecator.logRuntimeDeprecation({ usage: 'insecure adapter' });
}
}
get mount() {
var mount = this._mount;
if (this.publicServerURL) {