forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfected_file_email.mustache
80 lines (73 loc) · 3.3 KB
/
infected_file_email.mustache
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
77
78
79
80
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/infected_file_email
Moodle template for infected files emails.
Context variables required for this template:
* report - Hyperlink to the report page,
* scanner - Scanning engine that found this file,
* filename - Name of the infected file,
* filesize - Size of the file,
* contenthash - File content hash,
* contenttype - Type of uploaded file,
* author - User that uploaded the file,
* ipaddress - IP address the file was uploaded from,
* geoinfo - Geo information about IP address,
* referer - The referring page,
* identityproviders - List of identiy providers,
* date - Date of upload
* notice - Notice returned from the scanning engine
* additionalinfo - Any additional information from the scanning engine
Example context (json):
{
"header": "Infected file detected",
"report": "http://example.moodle/report/infectedfiles/index.php",
"scanner": "antivirus_clamav",
"filename": "virus.txt",
"filesize": 100,
"contenthash": "3395856ce81f2b7382dee72602f798b642f14140",
"contenttype": "text/plain",
"author": "Example User (exampleuser)",
"ipaddress": "192.168.0.1",
"geoinfo": "Brisbane, Australia",
"referer": "http://example.moodle/user/files.php",
"date": "28/05/20, 11:19",
"notice": "Clamav scanning has tried 1 time(s). ClamAV has failed to run.",
"additionalinfo": "Here is the output from ClamAV: /tmp/phpElIcr2: Not a regular file ERROR"
}
}}
<div>
<b>{{header}}</b>
<div>
<p><b>{{#str}} emailreport, antivirus {{/str}}</b><a href={{report}}>{{report}}</a></p>
<p><b>{{#str}} emailscanner, antivirus {{/str}}</b>{{scanner}}</p>
<br>
<p><b>{{#str}} emailfilename, antivirus {{/str}}</b>{{filename}}</p>
<p><b>{{#str}} emailfilesize, antivirus {{/str}}</b>{{filesize}}</p>
<p><b>{{#str}} emailcontenthash, antivirus {{/str}}</b>{{contenthash}}</p>
<p><b>{{#str}} emailcontenttype, antivirus {{/str}}</b>{{contenttype}}</p>
<p><b>{{#str}} emaildate, antivirus {{/str}}</b>{{date}}</p>
<br>
<p><b>{{#str}} emailauthor, antivirus {{/str}}</b>{{author}}</p>
<p><b>{{#str}} emailipaddress, antivirus {{/str}}</b>{{ipaddress}}</p>
<p><b>{{#str}} emailgeoinfo, antivirus {{/str}}</b>{{geoinfo}}</p>
<p><b>{{#str}} emailreferer, antivirus {{/str}}</b><a href={{referer}}>{{referer}}</a></p>
</div>
<div>
<br>
<pre>{{notice}}</pre>
<br>
<p><b>{{#str}} emailadditionalinfo, antivirus {{/str}} </b></p>
</div>
</div>