rails/activestorage/lib
Rosa Gutierrez d40284b1a4
Force content disposition to attachment for specific content types
In this way we avoid HTML, XML, SVG and other files that can be rendered
by the browser to be served inline by default. Depending on the origin
from where these files are served, this might lead to XSS
vulnerabilities, and in the best case, to more realistic phishing
attacks and open redirects.

We force it rather than falling back to it when other disposition is not
provided. Otherwise it would be possible for someone to force inline
just by passing `disposition=inline` in the URL.

The list of content types to be served as attachments is configurable.
2018-01-05 16:32:32 +01:00
..
active_storage Force content disposition to attachment for specific content types 2018-01-05 16:32:32 +01:00
tasks Invoke app-prefixed active storage task when in engine 2017-12-13 22:05:17 +09:00
active_storage.rb Force content disposition to attachment for specific content types 2018-01-05 16:32:32 +01:00