This parameter makes the server return a response with raw file contents and headers that cause the browser to show a 'save as' dialog. Regarding Content-Security-Policy: https://www.w3.org/TR/CSP2/#sandbox-usage > For example, a message board or email system might provide downloads of > arbitrary attachments provided by other users. Attacks that rely on tricking > a client into rendering one of these attachments could be mitigated by > requesting that resources only be rendered in a very restrictive sandbox. > Sending the sandbox directive with an empty value establishes such an > environment: > > Content-Security-Policy: sandbox https://www.w3.org/TR/CSP2/#directive-default-src > Given this behavior, one good way of building a policy for a site would be to > begin with a default-src of 'none', and to build up a policy from there that > contains only those resource types which are actually in use for the page > you’d like to protect. If you don’t use webfonts, for instance, there’s no > reason to specify a source list for font-src; specifying only those resource > types a page uses ensures that the possible attack surface for that page > remains as small as possible. https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html#defense-in-depth > A strong CSP provides an effective second layer of protection against various > types of vulnerabilities, especially XSS. Although CSP doesn't prevent web > applications from containing vulnerabilities, it can make those > vulnerabilities significantly more difficult for an attacker to exploit. The idea is to prevent the browser from loading any external resources, if it turned out it's possible to trick it into interpreting a file as HTML.
22 lines
548 B
HTML
22 lines
548 B
HTML
{% extends "layout.html" %}
|
|
|
|
{% block title %}
|
|
{{ title_path }} {{ current_project|capitalize }} source code {{ current_tag }} - Bootlin
|
|
{% endblock %}
|
|
|
|
{% block description -%}
|
|
Elixir Cross Referencer - source file of {{ current_project|capitalize }} (version {{ current_tag }}). Browsed file: {{ '/' if path|length == 0 else path }}
|
|
{%- endblock %}
|
|
|
|
{% block main %}
|
|
<div class="lxrcode">
|
|
{{ code }}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block footer %}
|
|
<span id="file-download-link">
|
|
<a href="?raw">Download file</a>
|
|
</span>
|
|
{% endblock %}
|
|
|