Merge pull request #14 from MengMengCode/alert-autofix-29

Potential fix for code scanning alert no. 29: DOM text reinterpreted as HTML
This commit is contained in:
Meng Meng
2026-06-13 21:04:48 +08:00
committed by GitHub
+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));