Compare commits
2 Commits
7e60d0e920
...
73eaccb483
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73eaccb483 | ||
|
|
c6f423b5ac |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.60",
|
||||
"version": "4.6.61",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.60",
|
||||
"version": "4.6.61",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.60",
|
||||
"version": "4.6.61",
|
||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||
"main": "dist/main.js",
|
||||
"author": "xRangerDE",
|
||||
|
||||
15
src/main.ts
15
src/main.ts
@ -6975,7 +6975,20 @@ ipcMain.handle('install-update', () => {
|
||||
});
|
||||
|
||||
ipcMain.handle('open-external', async (_, url: string) => {
|
||||
await shell.openExternal(url);
|
||||
// Only allow https / http URLs — never let the renderer push a
|
||||
// file://, javascript:, or shell:-style URL through to the OS
|
||||
// shell.openExternal handler. The renderer is contextIsolated +
|
||||
// nodeIntegration: false, but an XSS through (e.g.) a streamer name
|
||||
// smuggling a payload into a template would otherwise hand the
|
||||
// attacker shell.openExternal which on Windows happily resolves
|
||||
// file:///C:/Windows/System32/calc.exe.
|
||||
if (typeof url !== 'string') return;
|
||||
const trimmed = url.trim();
|
||||
if (!/^https?:\/\//i.test(trimmed)) {
|
||||
appendDebugLog('open-external-rejected', { url: trimmed.slice(0, 200) });
|
||||
return;
|
||||
}
|
||||
await shell.openExternal(trimmed);
|
||||
});
|
||||
|
||||
// Tracks active standalone clip downloads so cancel-download / window-all-closed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user