Potential fix for code scanning alert no. 29: DOM text reinterpreted as HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Meng Meng
2026-06-13 21:04:10 +08:00
committed by GitHub
parent 4dfd7c0885
commit 2ed42992ed
+2 -1
View File
@@ -761,7 +761,8 @@
var rows = currentRules.map(function (rule, idx) {
var dir = (rule.direction || 'in').toLowerCase();
var proto = (rule.protocol || 'tcp').toLowerCase();
var action = (rule.action || 'ACCEPT').toUpperCase();
var rawAction = (rule.action || 'ACCEPT').toUpperCase();
var action = rawAction === 'ACCEPT' ? 'ACCEPT' : 'DROP';
var network = (rule.network || 'ipv4').toLowerCase();
var port = escapeHtml(portDisplay(rule.port));
var srcIp = escapeHtml(sourceIpDisplay(rule.source_ip));