mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-02 05:57:59 +00:00
fix(add-window): harden intake admission and destination safety
- retain valid magnet clipboard handoffs and reject malformed magnet URLs - normalize destination identity and fail closed on deleted queues - redact malformed media headers and add focused regression coverage
This commit is contained in:
@@ -29,6 +29,12 @@ describe('download locations', () => {
|
||||
expect(downloadLocationEquals('/home/Test', 'Movie.MP4', '/home/test', 'movie.mp4', 'linux')).toBe(false);
|
||||
});
|
||||
|
||||
it('matches destinations with redundant separators without changing platform case rules', () => {
|
||||
expect(downloadLocationEquals('/Users/test//Downloads/', 'file.zip', '/Users/test/Downloads', 'file.zip', 'macos')).toBe(true);
|
||||
expect(downloadLocationEquals('//Users/test/Downloads', 'file.zip', '/Users/test/Downloads', 'file.zip', 'macos')).toBe(true);
|
||||
expect(downloadLocationEquals('\\\\server\\share\\downloads', 'file.zip', '//server//share/downloads/', 'file.zip', 'windows')).toBe(true);
|
||||
});
|
||||
|
||||
it('uses a remembered Add-window directory only when the setting is enabled', () => {
|
||||
expect(resolveInitialAddWindowLocation(
|
||||
'D:\\Downloads',
|
||||
|
||||
Reference in New Issue
Block a user