From be482f5097cc74c35c688986dbdf5f74c0e4fe31 Mon Sep 17 00:00:00 2001 From: tuvokyang Date: Sat, 20 Sep 2025 15:05:23 +0800 Subject: [PATCH] luci-mod-network: resolve authentication issues during 802.1X Wi-Fi connection Signed-off-by: tuvokyang --- .../htdocs/luci-static/resources/view/network/wireless.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 1cf5ad37a3..708a4f510b 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -2100,8 +2100,8 @@ return view.extend({ const zoneval = zoneopt ? zoneopt.formvalue('_new_') : null; const enc = L.isObject(bss.encryption) ? bss.encryption : null; const is_wep = (enc && Array.isArray(enc.wep)); - const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'psk'; }).length > 0); - const is_sae = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'sae'; }).length > 0); + const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'psk')); + const is_sae = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'sae')); if (nameval == null || (passopt && passval == null)) return; @@ -2218,7 +2218,7 @@ return view.extend({ const s2 = m2.section(form.NamedSection, '_new_'); const enc = L.isObject(bss.encryption) ? bss.encryption : null; const is_wep = (enc && Array.isArray(enc.wep)); - const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'psk' || a == 'sae'; })); + const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'psk' || a == 'sae')); let replace, passphrase, name, bssid, zone; function nameUsed(name) { -- 2.30.2