From 242ba6ae6e021fd002b5f7070fe0d7c1bae7debf Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 21 Sep 2026 10:13:21 +0200 Subject: [PATCH] luci-app-strongswan-swanctl: remove 15 char section name limit The 'swanctl.conf' does not impose any length restriction on connection and children (section) names. They are plain strings parsed by strongswan config parser without a fixed-size buffer. Likewise, uci does not enforce a maximum length for named sections. libuci's uci_validate_str() only restricts the allowed character set (alphanumeric and underscore, for shell compatibility) and allocates section names dynamically via strdup(), so there is no built-in buffer size that would truncate or reject longer names. The previous 15-character cap therefore had no basis in either 'swanctl.conf' or uci itself and can be dropped without risking truncation, parsing errors, or incompatibility. Signed-off-by: Florian Eckert --- .../luci-static/resources/view/strongswan-swanctl/swanctl.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js index fc729fe34c..225c2e19e6 100644 --- a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js +++ b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js @@ -44,9 +44,8 @@ function sectionNameCheck(extra_class) { return s['.name'] == v; })) { return _('Remotes, Encryption Proposals and Tunnels may not share the same names.') + ' ' + - _('Use combinations like tunnel1_phase1 that do not exceed 15 characters.'); + _('Use combinations like tunnel1_phase1.'); } - if (v.length > 15) return _('Name length shall not exceed 15 characters'); return true; }, 'blur', 'keyup'); return el;