Spaces:
Running
Running
Commit ·
d7d6d05
1
Parent(s): 8d3abc6
fix(H-01): sanitize event.title/detail/date/source in Timeline.render() -- XSS via scraped Neo4j data
Browse files- frontend/js/timeline.js +4 -4
frontend/js/timeline.js
CHANGED
|
@@ -83,19 +83,19 @@ const Timeline = {
|
|
| 83 |
</span>
|
| 84 |
<span style="font-size:12px;font-weight:600;
|
| 85 |
color:var(--text-primary)">
|
| 86 |
-
${event.title}
|
| 87 |
</span>
|
| 88 |
</div>
|
| 89 |
<div style="font-size:11px;color:var(--text-secondary);
|
| 90 |
-
margin-bottom:3px">${event.detail||''}</div>
|
| 91 |
<div style="display:flex;justify-content:space-between">
|
| 92 |
<span style="font-size:10px;color:var(--text-muted)">
|
| 93 |
-
${event.date}
|
| 94 |
</span>
|
| 95 |
<span style="font-size:10px;color:var(--text-muted);
|
| 96 |
background:var(--bg-secondary);
|
| 97 |
padding:1px 6px;border-radius:4px">
|
| 98 |
-
${event.source}
|
| 99 |
</span>
|
| 100 |
</div>
|
| 101 |
</div>
|
|
|
|
| 83 |
</span>
|
| 84 |
<span style="font-size:12px;font-weight:600;
|
| 85 |
color:var(--text-primary)">
|
| 86 |
+
${sanitize(event.title || "")}
|
| 87 |
</span>
|
| 88 |
</div>
|
| 89 |
<div style="font-size:11px;color:var(--text-secondary);
|
| 90 |
+
margin-bottom:3px">${sanitize(event.detail || '')}</div>
|
| 91 |
<div style="display:flex;justify-content:space-between">
|
| 92 |
<span style="font-size:10px;color:var(--text-muted)">
|
| 93 |
+
${sanitize(event.date || "")}
|
| 94 |
</span>
|
| 95 |
<span style="font-size:10px;color:var(--text-muted);
|
| 96 |
background:var(--bg-secondary);
|
| 97 |
padding:1px 6px;border-radius:4px">
|
| 98 |
+
${sanitize(event.source || "")}
|
| 99 |
</span>
|
| 100 |
</div>
|
| 101 |
</div>
|