mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-10-31 02:51:58 +01:00
Fix stored XSS in received packet rendering
This commit is contained in:
1 parent
b2ba3d992a
commit
206d831941
1 file changed
+5
-7
@@ -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);
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user