-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue
Parse Server uses and provides a globally pinned Parse object for use in Cloud Code. This is a problematic design because the globally pinned instance may be initialized properly for use in Cloud Code (masterKey, appId, serverURL, etc.), but another module like the push adapter may use a different version of parse dependency, which prevents npm from deduplicating the dependency. Code that references that other version uses an uninitialized instance of Parse which causes the error: Cannot use the Master Key, it has not been provided..
Fix
Remove the global pinning and explicitly import Parse wherever needed. Also explicitly expose the initialized Parse instance via a Parse Server API, like Parse.Server or Parse.Cloud.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed