diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-24 08:09:02 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-24 08:09:02 +0200 |
commit | 4a564736eaa765249ae0ab72d1364c2e229debad (patch) | |
tree | 0666c6ce5998fecd36ab6483548e8485b3d25e33 | |
parent | e630b32498767164004e965f34471d70d6e6f51c (diff) |
luci-mod-network: wireless.js: properly handle SAE in join confirmation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js | 9 |
1 files changed, 7 insertions, 2 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 282508561..e6494f6b2 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 @@ -1721,7 +1721,8 @@ return L.view.extend({ zoneval = zoneopt ? zoneopt.formvalue('_new_') : null, enc = L.isObject(bss.encryption) ? bss.encryption : null, is_wep = (enc && Array.isArray(enc.wep)), - is_psk = (enc && Array.isArray(enc.wpa) && Array.isArray(enc.authentication) && enc.authentication[0] == 'psk'); + is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'psk' })), + is_sae = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'sae' })); if (nameval == null || (passopt && passval == null)) return; @@ -1749,7 +1750,11 @@ return L.view.extend({ else if (bss.bssid != null) uci.set('wireless', section_id, 'bssid', bss.bssid); - if (is_psk) { + if (is_sae) { + uci.set('wireless', section_id, 'encryption', 'sae'); + uci.set('wireless', section_id, 'key', passval); + } + else if (is_psk) { for (var i = enc.wpa.length - 1; i >= 0; i--) { if (enc.wpa[i] == 2) { uci.set('wireless', section_id, 'encryption', 'psk2'); |