security: don't let renderer know custom vencord path

It's best not to let the renderer know about the system's file structure.
In case of a vulnerability allowing arbitrary file writes, this would make it considerably easier to overwrite critical files
This commit is contained in:
Vendicated
2026-01-07 22:57:23 +01:00
parent 0f509b002d
commit 786c3cc196
4 changed files with 18 additions and 13 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ export const VesktopNative = {
disable: () => invoke<void>(IpcEvents.DISABLE_AUTOSTART)
},
fileManager: {
showItemInFolder: (path: string) => invoke<void>(IpcEvents.SHOW_ITEM_IN_FOLDER, path),
getVencordDir: () => sendSync<string | undefined>(IpcEvents.GET_VENCORD_DIR),
isUsingCustomVencordDir: () => sendSync<boolean>(IpcEvents.IS_USING_CUSTOM_VENCORD_DIR),
showCustomVencordDir: () => invoke<void>(IpcEvents.SHOW_CUSTOM_VENCORD_DIR),
selectVencordDir: (value?: null) => invoke<"cancelled" | "invalid" | "ok">(IpcEvents.SELECT_VENCORD_DIR, value),
chooseUserAsset: (asset: string, value?: null) =>
invoke<"cancelled" | "invalid" | "ok" | "failed">(IpcEvents.CHOOSE_USER_ASSET, asset, value)