parse-community / parse-community/parse-server
Remove globally pinned `Parse` instance
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the globally pinned Parse instance through Cloud Code and the push adapter, then inspect how Parse.Server or Parse.Cloud could expose the initialized instance. Done means the global pin is removed, consumers use the initialized instance, and the reported Master Key failure is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100