提交 8697bdff 编写于 作者: W Wadeck Follonier 提交者: Daniel Beck

[SECURITY-944]

上级 f46842c7
......@@ -23,6 +23,7 @@
*/
package hudson.model;
import hudson.Util;
import hudson.util.RunList;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
......@@ -64,7 +65,9 @@ public class BuildTimelineWidget {
Event e = new Event();
e.start = new Date(r.getStartTimeInMillis());
e.end = new Date(r.getStartTimeInMillis()+r.getDuration());
e.title = r.getFullDisplayName();
// due to SimileAjax.HTML.deEntify (in simile-ajax-bundle.js), "&lt;" are transformed back to "<", but not the "&#60";
// to protect against XSS
e.title = Util.escape(r.getFullDisplayName()).replace("&lt;", "&#60;");
// what to put in the description?
// e.description = "Longish description of event "+r.getFullDisplayName();
// e.durationEvent = true;
......
......@@ -56,7 +56,7 @@ THE SOFTWARE.
onSuccess: function(t) {
if (t.status != 0) {
try {
eventSource1.loadJSON(eval('('+t.responseText+')'),'.');
eventSource1.loadJSON(JSON.parse(t.responseText),'.');
getData(eventSource1, current-1, min, max);
} catch (e) {
alert(e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册