Skip to content

Commit

Permalink
[Test] modify test_download_with_rename_sanitised
Browse files Browse the repository at this point in the history
With RFC2045 specification, Content-Disposition filenames
parameter containing slash (directory separator) must be
quoted, so changing as such.
  • Loading branch information
mtasaka committed Sep 4, 2024
1 parent 981b429 commit 3b0fe80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deluge/tests/test_httpdownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async def test_download_with_rename_exists(self):
self.assert_contains(filename, 'This file should be called renamed')

async def test_download_with_rename_sanitised(self):
url = self.get_url('rename?filename=/etc/passwd')
url = self.get_url('rename?filename="/etc/passwd"')
filename = await download_file(url, fname('original'))
assert filename == fname('passwd')
self.assert_contains(filename, 'This file should be called /etc/passwd')
Expand Down

0 comments on commit 3b0fe80

Please sign in to comment.