fix(security): resolve all medium severity vulnerabilities

- Ensure yt-dlp partial files are cleaned up on error exits.
- Handle Semaphore closure gracefully without panicking.
- Replace busy-polling in wait_permit_released with Notify.
- Fix extension server silent failure with retry loop and logging.
- Ignore malformed existing scheduler settings instead of failing.
- Add final symlink checks before revealing/opening downloads.
- Delay listener registration in App.tsx until core is ready.
- Sanitize Referer header to prevent injection.
This commit is contained in:
NimBold
2026-06-25 00:19:18 +03:30
parent 187d70f348
commit 8a258981ce
6 changed files with 221 additions and 143 deletions
+2 -1
View File
@@ -513,6 +513,7 @@ function App() {
}, [theme]);
useEffect(() => {
if (!coreReady) return;
const unlistenDownload = initDownloadListener();
const unlistenTerminalState = listen('download-state', (event) => {
@@ -571,7 +572,7 @@ function App() {
unlistenDeepLink.then(f => f());
unlistenDownload.then(f => { if (f) f(); });
};
}, []);
}, [coreReady]);
return (
<div className="app-shell flex h-screen w-screen overflow-hidden text-text-primary">
+1 -1
View File
@@ -107,7 +107,7 @@ export const AddDownloadsModal = () => {
setChecksumAlgo('SHA-256');
setChecksumValue('');
setHeaders([
pendingAddReferer ? `Referer: ${pendingAddReferer}` : '',
pendingAddReferer ? `Referer: ${pendingAddReferer.replace(/[\r\n]/g, '')}` : '',
pendingAddHeaders
].filter(Boolean).join('\n'));
setCookies(pendingAddCookies);