templates: Hopefully escape all template inputs
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
is
|
||||
[% END %]
|
||||
the output of a RunCommand execution of the command <tt>[% HTML.escape(runcommandlog.command) %]</tt>
|
||||
on <a [% HTML.attributes(href => c.uri_for('/build', build.id)) %]>Build [% build.id %]</a>.
|
||||
on <a [% HTML.attributes(href => c.uri_for('/build', build.id)) %]>Build [% HTML.escape(build.id) %]</a>.
|
||||
[% IF tail %]
|
||||
The <a [% HTML.attributes(href => c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid)) %]>full log</a> is also available.
|
||||
[% END %]
|
||||
@@ -33,7 +33,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