mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-07 18:03:23 +00:00
fix: resolve P0 and P1 audit findings
- Fix state corruption on deleted queues in frontend - Prevent concurrent dispatch of duplicate downloads - Fix file paths when deleting native downloads - Ensure pausing and resuming items persist state to database - Remove duplicate IPC invocations for speed limits - Stop PropertiesModal from resetting inputs during download progress - Switch aria2 secret to use secure v4 UUID - Fix SSRF vulnerability in fetch_metadata via DNS rebinding block - Resolve race condition when reading media download logs - Gracefully handle panics when acquiring prevent sleep lock - Rate limit native downloads respecting global settings - Enforce TLS certificate validation in backend requests
This commit is contained in:
@@ -98,9 +98,7 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
|
||||
};
|
||||
|
||||
const handleResume = (item: DownloadItem) => {
|
||||
useDownloadStore.setState((state) => ({
|
||||
downloads: state.downloads.map(d => d.id === item.id ? { ...d, status: 'queued', speed: '-', eta: '-' } : d)
|
||||
}));
|
||||
updateDownload(item.id, { status: 'queued', _dispatched: false, speed: '-', eta: '-' });
|
||||
useDownloadStore.getState().processQueue();
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ export const PropertiesModal = () => {
|
||||
const {
|
||||
selectedPropertiesDownloadId,
|
||||
setSelectedPropertiesDownloadId,
|
||||
downloads,
|
||||
updateDownload
|
||||
} = useDownloadStore();
|
||||
|
||||
@@ -43,7 +42,7 @@ export const PropertiesModal = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedPropertiesDownloadId) {
|
||||
const activeItem = downloads.find(d => d.id === selectedPropertiesDownloadId);
|
||||
const activeItem = useDownloadStore.getState().downloads.find(d => d.id === selectedPropertiesDownloadId);
|
||||
if (activeItem) {
|
||||
setItem(activeItem);
|
||||
setUrl(activeItem.url);
|
||||
@@ -89,7 +88,7 @@ export const PropertiesModal = () => {
|
||||
} else {
|
||||
setItem(null);
|
||||
}
|
||||
}, [selectedPropertiesDownloadId, downloads, defaultDownloadPath]);
|
||||
}, [selectedPropertiesDownloadId, defaultDownloadPath]);
|
||||
|
||||
if (!selectedPropertiesDownloadId || !item) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user