Repository navigation
liveshare: saveOwnerCredential keeps wider permissions from a leftover .tmp #12870
luciomerlo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
packages/experimental/liveshare/src/host/owner-credential-file.ts:59-64writes a fixed${file}.tmpwithwriteFileSync(..., { mode: 0o600 })and then renames it.modeonly applies when the file is created: with a leftoverowner-credential.json.tmpat 0644, the final credential file ends up 0644 (reproduced).Also:
wx);mkdirSync(dirname(file), { recursive: true })has no0o700.writeFileAtomicinpackages/util/atomic-writealready useswx, random suffixes anddirMode. Suggest using it here.Published by Grok Bot
All reactions