Put file download links ('?save=true') in WUI directory listings #827
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#827
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Typical behaviour of web browsers for a retrieved over HTTPS, is to decide based on its inferred MIME type whether to display it, pass it to some plugin/helper app, or treat it as a download (either pass it to a download manager or prompt the user to save it locally). The inferred MIME type is arrived at by rules that no-one understands; the HTTP spec says that the HTTP Content-Type takes precedence, but browsers deliberately violate that in some cases, and the result can even vary nondeterministically depending on network delays.
Sometimes it's useful to override this behaviour and force the browser to treat the file as a download, regardless of its inferred MIME type. This can be done using the Content-Disposition HTTP header, e.g. "Content-Disposition: attachment; filename=suggested_name".
(Well, not actually force, but strongly hint. I think all the common browsers now implement this; IE has had some bugs http://support.microsoft.com/kb/279667 but I think they are all pre-IE6.)
Content-Disposition is specified in:
(The "very serious security considerations" mentioned in http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.5 are scaremongering. A server can't do anything with
Content-Disposition: attachment
that can't also be done via the MIME type.)To close this ticket,
Note that if the most prominant link for a non-directory file was the download link, that would allow the WUI to be used from a browser (with some care on the part of users) without necessarily being vulnerable to the same-origin attacks described in #615. Users would only be vulnerable to these attacks if they click the view link, or if they view the downloaded local files in a browser that treats all file URLs as same-origin (or has some other related bug such as http://www.mozilla.org/security/announce/2009/mfsa2009-30.html ).
Support forcing download using "Content-Disposition: attachment" in WUItreto Support forcing download using "Content-Disposition: attachment" in WUIThe facility to download using
Content-Disposition: attachment
already exists, using thesave=true
parameter. It is even documented in source:docs/frontends/webapi.txt . I was confused partly by seeing the undocumented@@named
feature used by the file info page, which downloads the file astext/plain
(treated by browsers as "guess the type").However, there isn't any way to access the file download URI from the WUI other than by manually adding the
save=true
parameter, which makes this feature undiscoverable except by reading technical docs.Support forcing download using "Content-Disposition: attachment" in WUIto Put file download links ('?save=true') in WUI directory listingsIf #1029 were implemented, it would make sense for child entries that are directories to have a 'download as archive' link.
Replying to davidsarah:
The scope of this ticket for 1.11 is just to add the download link for files, probably as an icon next to the filename.
See also #277 where I wish for an alternate design for the WUI where every link in LAFS has a page in the WUI. That page would be the place where a Save-As and a Display would go, perhaps.
Brian suggested a good idea: a separate port for "pure bytes, unmolested by the LAFS layer -- what you put in is what you get at" and for "content, such as should be displayed in a web browser". Fetching a resource (e.g. with a file cap) from the latter port might result in content that wrapped in a Secure Ecmascript prefix, for example, which attempts to nullify the ability of Javascript within the content to do bad things once it is displayed in a browser.
I propose that we have separate ports for at least these uses:
Please stay on topic for this ticket! A separate ticket should be filed for the multiple-port idea, or use #615 for general discussion of WUI same-origin and sandboxing issues.
Comment that should really be on #1797, except that it's addressing comment:73397 :
allow-scripts
is set in thesandbox
tag. Multi-page JS webapps can also work if they do not rely on same-origin information sharing, although we might need to handle .css and .js filetypes differently because the browser will be expecting them to be served raw, not framed.Multiple ports ticket filed as #1798.
Milestone renamed
renaming milestone
Moving open issues out of closed milestones.
Ticket retargeted after milestone closed