mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-20 16:12:17 +00:00
fix(aria2): harden protocol and torrent transfers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user