From be5f039f0be7f8653c10edddf5b5cdcb3afc8a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 19 Sep 2024 10:20:43 +0200 Subject: [PATCH] tests should expect correct filename* values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- .../coreApiVersions/fileVersions.feature | 8 ++-- .../downloadFile.feature | 42 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/acceptance/features/coreApiVersions/fileVersions.feature b/tests/acceptance/features/coreApiVersions/fileVersions.feature index 56e1180aa35..9658d6f6117 100644 --- a/tests/acceptance/features/coreApiVersions/fileVersions.feature +++ b/tests/acceptance/features/coreApiVersions/fileVersions.feature @@ -163,13 +163,13 @@ Feature: dav-versions Then the HTTP status code should be "200" And the following headers should be set | header | value | - | Content-Disposition | attachment; filename*=UTF-8''"textfile0.txt"; filename="textfile0.txt" | + | Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" | And the downloaded content should be "version 1" When user "Alice" downloads the version of file "textfile0.txt" with the index "2" Then the HTTP status code should be "200" And the following headers should be set | header | value | - | Content-Disposition | attachment; filename*=UTF-8''"textfile0.txt"; filename="textfile0.txt" | + | Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" | And the downloaded content should be "uploaded content" @skipOnStorage:ceph @skipOnStorage:scality @@ -182,13 +182,13 @@ Feature: dav-versions Then the HTTP status code should be "200" And the following headers should be set | header | value | - | Content-Disposition | attachment; filename*=UTF-8''"textfile0.txt"; filename="textfile0.txt" | + | Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" | And the downloaded content should be "version 2" When user "Alice" downloads the version of file "textfile0.txt" with the index "2" Then the HTTP status code should be "200" And the following headers should be set | header | value | - | Content-Disposition | attachment; filename*=UTF-8''"textfile0.txt"; filename="textfile0.txt" | + | Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" | And the downloaded content should be "uploaded content" diff --git a/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature b/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature index a028ceada2b..7aaeb79b300 100644 --- a/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature +++ b/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature @@ -270,7 +270,7 @@ Feature: download file Then the HTTP status code should be "200" And the following headers should be set | header | value | - | Content-Disposition | attachment; filename*=UTF-8''""; filename="" | + | Content-Disposition | attachment; filename*=UTF-8''; filename="" | | Content-Security-Policy | default-src 'none'; | | X-Content-Type-Options | nosniff | | X-Download-Options | noopen | @@ -280,20 +280,20 @@ Feature: download file | X-XSS-Protection | 1; mode=block | And the downloaded content should be "test file" Examples: - | dav-path-version | file | - | old | textfile.txt | - | old | comma,.txt | - | old | 'quote'single'.txt | - | new | textfile.txt | - | new | comma,.txt | - | new | 'quote'single'.txt | + | dav-path-version | file | encoded | + | old | textfile.txt | textfile.txt | + | old | comma,.txt | comma%2C.txt | + | old | 'quote'single'.txt | %27quote%27single%27.txt | + | new | textfile.txt | textfile.txt | + | new | comma,.txt | comma%2C.txt | + | new | 'quote'single'.txt | %27quote%27single%27.txt | @skipOnRevaMaster Examples: - | dav-path-version | file | - | spaces | textfile.txt | - | spaces | comma,.txt | - | spaces | 'quote'single'.txt | + | dav-path-version | file | encoded | + | spaces | textfile.txt | textfile.txt | + | spaces | comma,.txt | comma%2C.txt | + | spaces | 'quote'single'.txt | %27quote%27single%27.txt | @smokeTest @issue-8361 Scenario Outline: downloading a file should serve security headers (file with doubel quotes) @@ -302,15 +302,15 @@ Feature: download file When user "Alice" downloads file '/"quote"double".txt' using the WebDAV API Then the HTTP status code should be "200" And the following headers should be set - | header | value | - | Content-Disposition | attachment; filename*=UTF-8''""quote"double".txt"; filename=""quote"double".txt" | - | Content-Security-Policy | default-src 'none'; | - | X-Content-Type-Options | nosniff | - | X-Download-Options | noopen | - | X-Frame-Options | SAMEORIGIN | - | X-Permitted-Cross-Domain-Policies | none | - | X-Robots-Tag | none | - | X-XSS-Protection | 1; mode=block | + | header | value | + | Content-Disposition | attachment; filename*=UTF-8''%22quote%22double%22.txt; filename=""quote"double".txt" | + | Content-Security-Policy | default-src 'none'; | + | X-Content-Type-Options | nosniff | + | X-Download-Options | noopen | + | X-Frame-Options | SAMEORIGIN | + | X-Permitted-Cross-Domain-Policies | none | + | X-Robots-Tag | none | + | X-XSS-Protection | 1; mode=block | And the downloaded content should be "test file" Examples: | dav-path-version |