Skip to content

Commit ca34cac

Browse files
authored
Merge pull request #145 from Brskt/fix-sandbox-env-whitelist
Fix sandbox env blocking DiscordRPC and IPC sockets
2 parents f5de983 + 78063a2 commit ca34cac

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

native/NativeModule/secureLoad.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ export const secureLoad = (moduleInfo: NativeModuleInfo): Module["exports"] => {
117117
nextTick: (...args: Parameters<typeof process.nextTick>) => process.nextTick(...args),
118118
hrtime: (time?: [number, number]) => process.hrtime(time),
119119
...objectify({
120-
env: {},
120+
env: Object.freeze(Object.fromEntries(
121+
["TMPDIR", "TMP", "TEMP", "XDG_RUNTIME_DIR", "HOME", "USERPROFILE", "PATH", "APPDATA"]
122+
.filter((k) => k in process.env)
123+
.map((k) => [k, process.env[k]]),
124+
)),
121125
version: process.version,
122126
versions: process.versions,
123127
platform: process.platform,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "luna",
3-
"version": "1.12.3-beta",
3+
"version": "1.12.4-beta",
44
"description": "A client mod for the Tidal music app for plugins",
55
"author": {
66
"name": "Inrixia",

0 commit comments

Comments
 (0)