Skip to content

Commit

Permalink
tests should expect correct filename* values
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Sep 19, 2024
1 parent f3772d1 commit be5f039
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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''"<file>"; filename="<file>" |
| Content-Disposition | attachment; filename*=UTF-8''<encoded>; filename="<file>" |
| Content-Security-Policy | default-src 'none'; |
| X-Content-Type-Options | nosniff |
| X-Download-Options | noopen |
Expand All @@ -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)
Expand All @@ -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 |
Expand Down

0 comments on commit be5f039

Please sign in to comment.