Repository navigation
fix: trust the system certificate store in the desktop backend - #2001
Open
ZacharyZcR wants to merge 1 commit into
Open
ZacharyZcR wants to merge 1 commit into
ZacharyZcR wants to merge 1 commit into
Conversation
Electron drops NODE_EXTRA_CA_CERTS while the nodeOptions fuse is off, so the embedded backend never saw the variable and plugin processes such as Sync could not reach a server signed by a private CA. Trust the system store there too, like the app window and the main process already do.
|
AI review | Looks safe to merge Adds system CA certificates to the trusted store for the desktop backend when Electron fuses drop NODE_EXTRA_CA_CERTS. The change is safe, well tested, and follows repo standards. Reviewed 4f8b343. AI can be wrong, a maintainer still decides. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1987.
Cause
The packaged app runs with the `nodeOptions` fuse off. In that case Electron itself unsets `NODE_EXTRA_CA_CERTS` while Node starts in the main process (`shell/common/node_bindings.cc` in v45.3.2), before `main.cjs` runs. `...process.env` in `utilityProcess.fork` therefore never passes the variable on. The code from #1895 in `starter.ts` never runs in the desktop app, and plugin processes (Sync) get no extra certificates.
The main process already merges `tls.getCACertificates("system")`, but the embedded backend and the plugin processes it starts did not.
Change
A user with a private CA adds it to the OS trust store (Keychain, certmgr, or the distro store). The reporter already did this.
Tests