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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user