fix(aria2): harden protocol and torrent transfers

This commit is contained in:
NimBold
2026-08-08 22:33:49 +03:30
parent 6c9950a690
commit c3755ce886
21 changed files with 830 additions and 106 deletions
+4
View File
@@ -566,6 +566,10 @@ const VOLATILE_PROGRESS_STATUSES = new Set([
*/
export const redactDownloadForPersistence = (item: DownloadItem): DownloadItem => {
const copy: DownloadItem = { ...item };
if (item.credentialsRequired === true
|| DOWNLOAD_SECRET_FIELDS.some(field => Boolean(item[field]))) {
copy.credentialsRequired = true;
}
delete copy.fraction;
delete copy.speed;
delete copy.eta;