Fix stored XSS in received packet rendering

This commit is contained in:
potato-pancake-png committed 2026-10-02 13:32:57 +09:00
1 parent b2ba3d992a
commit 206d831941
1 file changed
+6 -8
+6 -8
View File
@@ -606,13 +606,11 @@ function loadReceivedPackets(packets) {
packets.forEach((packet) => {
const element = document.createElement("tr");
element.innerHTML = `
<td>${packet.rxDate}</td>
<td>${packet.rxTime}</td>
<td>${packet.packet}</td>
<td>${packet.RSSI}</td>
<td>${packet.SNR}</td>
`;
['rxDate', 'rxTime', 'packet', 'RSSI', 'SNR'].forEach((field) => {
const cell = document.createElement("td");
cell.textContent = String(packet[field]);
element.appendChild(cell);
});
container.appendChild(element);
})
@@ -1172,4 +1170,4 @@ form.addEventListener("invalid", function (event) {
el.scrollIntoView({ block: "center", behavior: "smooth" });
}, 0);
}
}, true);
}, true);