fix(recorders): escape d.error in renderProbeResult to prevent XSS
This commit is contained in:
parent
9c83698b81
commit
76b0a5e05e
1 changed files with 1 additions and 1 deletions
|
|
@ -823,7 +823,7 @@
|
||||||
if (!d.ok) {
|
if (!d.ok) {
|
||||||
host.style.borderColor = 'oklch(62% 0.22 25 / 0.5)';
|
host.style.borderColor = 'oklch(62% 0.22 25 / 0.5)';
|
||||||
host.style.background = 'oklch(62% 0.22 25 / 0.08)';
|
host.style.background = 'oklch(62% 0.22 25 / 0.08)';
|
||||||
host.innerHTML = '<div style="color:var(--status-red);font-weight:500;margin-bottom:4px">No signal detected</div><div style="color:var(--text-secondary);white-space:pre-wrap">' + (d.error || 'Unknown error') + '</div>';
|
host.innerHTML = '<div style="color:var(--status-red);font-weight:500;margin-bottom:4px">No signal detected</div><div style="color:var(--text-secondary);white-space:pre-wrap">' + esc(d.error || 'Unknown error') + '</div>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
host.style.borderColor = 'oklch(68% 0.18 148 / 0.5)';
|
host.style.borderColor = 'oklch(68% 0.18 148 / 0.5)';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue