Skip to content

Commit

Permalink
fix content-dispostion header in dav
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
  • Loading branch information
dragonchaser committed Feb 6, 2024
1 parent dd8ef3b commit a432c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-content-disposition-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix Content-Disposition header in dav

We have added missing quotes to the Content-Disposition header in the dav service. This fixes an issue with files containing special characters in their names.

https://github.com/cs3org/reva/pull/4498
https://github.com/owncloud/ocis/issues/8361
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/net/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

// ContentDispositionAttachment builds a ContentDisposition Attachment header with various filename encodings
func ContentDispositionAttachment(filename string) string {
return "attachment; filename*=UTF-8''" + filename + "; filename=\"" + filename + "\""
return "attachment; filename*=UTF-8''\"" + filename + "\"; filename=\"" + filename + "\""
}

// RFC1123Z formats a CS3 Timestamp to be used in HTTP headers like Last-Modified
Expand Down

0 comments on commit a432c00

Please sign in to comment.