templates: Hopefully escape all template inputs
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
the build log (<a [% HTML.attributes(href => step ? c.uri_for('/build' build.id 'nixlog' step.stepnr, 'raw')
|
||||
: c.uri_for('/build' build.id 'log', 'raw')) %]>raw</a>) of derivation <tt>[% IF step; step.drvpath; ELSE; build.drvpath; END %]</tt>.
|
||||
[% IF step && step.machine %]
|
||||
It was built on <tt>[% step.machine %]</tt>.
|
||||
It was built on <tt>[% step.machine | html %]</tt>.
|
||||
[% END %]
|
||||
[% IF tail %]
|
||||
The <a [% HTML.attributes(href => step ? c.uri_for('/build' build.id 'nixlog' step.stepnr)
|
||||
@@ -37,7 +37,7 @@
|
||||
[% IF tail %]
|
||||
/* The server may give us a full log (e.g. if the log is in
|
||||
S3). So extract the last lines. */
|
||||
log_data = log_data.split("\n").slice(-[% tail %]).join("\n");
|
||||
log_data = log_data.split("\n").slice(-[% HTML.escape(tail) %]).join("\n");
|
||||
[% END %]
|
||||
|
||||
$("#contents").text(log_data);
|
||||
|
||||
Reference in New Issue
Block a user