mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-02 05:57:59 +00:00
fix(downloads): harden recovery, replacement, and cleanup
- make media credential recovery durable and explicit across lifecycle entry points - protect exact output replacement with platform-aware ownership, fingerprints, locks, and crash-safe quarantine - permanently remove unfinished assets while preserving safe completed and Torrent cleanup - add frontend, native, and localization regressions
This commit is contained in:
@@ -788,6 +788,16 @@ const persistableRequestHeaders = (headers: string | null | undefined): string |
|
||||
return lines.length > 0 ? lines.join('\n') : undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Preserve only stable, non-credential request context for an explicit
|
||||
* credentialless retry. This uses the same allow-list and URL sanitization as
|
||||
* persistence so a retry cannot accidentally reuse a signed Referer or an
|
||||
* unknown token-bearing header.
|
||||
*/
|
||||
export const headersWithoutCredentialMaterial = (
|
||||
headers: string | null | undefined
|
||||
): string | undefined => persistableRequestHeaders(headers);
|
||||
|
||||
/**
|
||||
* Returns a shallow copy of `item` with secret fields removed. Volatile
|
||||
* progress fields (`fraction`, `speed`, `eta`) are also dropped as in the
|
||||
|
||||
Reference in New Issue
Block a user