This file is indexed.

/usr/lib/python2.7/dist-packages/sagenb/data/sage/html/notebook/download_or_delete_datafile.html is in python-sagenb 1.0.1+ds1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends "html/notebook/base_aux.html" %}
{#
INPUT:
- worksheet - an instance of Worksheet
- username - a string containing a username
- filename_ - the name of the file
- file_is_image - a boolean stating whether the file is an image
- file_is_text - a boolean stating whether the file is a text file
- text_file_content - a string containing the content of a text file
#}

{% block page_id %}datafile-page{% endblock %}

{% block more_css %}
<style type="text/css">
    .CodeMirror-linenumber {
	border-right: 1px dotted blue;
	font-family: monospace;
	font-size: 10pt;
	line-height: 1.1em;
	margin: 0;
	padding: 0.4em 0.3em;
	text-align: right;
    }
</style>
{% endblock %}

{% block more_javascript %}
<link rel="stylesheet" href="/javascript/codemirror/lib/codemirror.css">
<script type="text/javascript" src="/javascript/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="/javascript/codemirror/mode/python/python.js"></script>
{% endblock %}

{% set path = "/home/%s/data/%s"|format(worksheet.filename(), filename_) %}

{% block sharebar_title %}
{{ gettext('Data file') }}: {{ filename_ }}
{% endblock %}

{% block after_sharebar %}
<p>{{ gettext('You may download <a href="%(p)s">%(f)s</a> or create a link to this file in worksheet ', p=path, f=filename_) |safe }} <select onchange="go_option(this);" class="worksheet">
<option selected>{{ gettext('select worksheet') }}</option>
{% for worksheet in notebook.active_worksheets_for(username) %}
    <option value='link_datafile("{{ worksheet.filename() }}","{{ filename_ }}")'>{{ worksheet.name() }}</option>
{% endfor %}
</select> {{ gettext('or <a href="/home/%(wf)s/datafile?name=%(f)s&action=delete">delete %(f)s.</a>', wf=worksheet.filename(), f=filename_) |safe }}</p>

<p>{{ gettext("Access %(f)s in this worksheet by typing <tt>DATA+'%(f)s'</tt>. Here DATA is a special variable that gives the exact path to all data files uploaded to this worksheet.", f=filename_) |safe }}</p>

<hr class="usercontrol" />

{% if file_is_image %}
<div align=center><img src="{{ path }}"></div>
{% elif file_is_text %}
<form method="post" action="savedatafile" enctype="multipart/form-data">
    <input type="submit" value="{{ gettext('Save Changes') }}" name="button_save" /> <input type="submit" value="{{ gettext('Cancel') }}" name="button_cancel" style="display:block" />
    <div style="border: 1px solid black; padding: 0px;">
        <textarea class="edit" name="textfield" rows=20 cols=100 id="textfield" style="overflow: auto;">{{ text_file_content }}</textarea>
    </div>
    <script type="text/javascript">
    $(document).ready(function () {
	CodeMirror.fromTextArea(document.getElementById('textfield'), {
		mode: "python",
		indentUnit: 4,
		lineNumbers: true,
		lineWrapping: false,
		parserConfig: {
			'version': 2,
		}
	}).setSize('100%', '25.0em');
      });
    </script>
    <input type="hidden" name="filename" value="{{ filename_ }}" id="filename" />
</form>
{% endif %}
{% endblock %}