From 1fcddb6de3102f5d32d70b8b285261a3868d29b0 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 14 Feb 2026 05:56:01 +0100 Subject: [PATCH] fix(luci-mitmproxy): Preserve autoban enabled state on save Add rmempty=false to autoban enabled flag to prevent LuCI from removing the option when saving the form. This fixes the issue where saving settings would reset autoban to disabled. Co-Authored-By: Claude Opus 4.5 --- .../htdocs/luci-static/resources/view/mitmproxy/settings.js | 1 + 1 file changed, 1 insertion(+) diff --git a/package/secubox/luci-app-mitmproxy/htdocs/luci-static/resources/view/mitmproxy/settings.js b/package/secubox/luci-app-mitmproxy/htdocs/luci-static/resources/view/mitmproxy/settings.js index bed2e463..25f12038 100644 --- a/package/secubox/luci-app-mitmproxy/htdocs/luci-static/resources/view/mitmproxy/settings.js +++ b/package/secubox/luci-app-mitmproxy/htdocs/luci-static/resources/view/mitmproxy/settings.js @@ -174,6 +174,7 @@ return view.extend({ o = s.option(form.Flag, 'enabled', _('Enable Auto-ban')); o.description = _('Automatically ban IPs that match threat patterns'); o.default = '1'; + o.rmempty = false; o = s.option(form.ListValue, 'sensitivity', _('Sensitivity Level')); o.description = _('Controls how quickly IPs are banned. Strict: immediate ban on first threat. Moderate: ban after 3 threats in 5 minutes. Permissive: ban after 5 threats in 1 hour.');