mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-10-31 02:51:58 +01:00
Merge pull request #470 from potato-pancake-png/fix/packet-display
Fix stored XSS in received packet rendering
This commit is contained in:
1 file changed
+6
-8
@@ -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);
|
||||
Reference in new issue
Block a user