From: Dirk Brenken Date: Mon, 8 May 2023 14:25:01 +0000 (+0200) Subject: luci-app-travelmate: fix QR-Code generation X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=081906f4bfbc3e7eaa80f4d2f802cedb52f983af;p=project%2Fluci.git luci-app-travelmate: fix QR-Code generation * fixed #6377 According to https://www.wi-fi.org/download.php?file=/sites/default/files/private/WPA3_Specification_v3.0.pdf (chapter 7) set the security type to 'WPA'. Tested with an Android device (Samsung 10e) and various WPA2- and WPA3-AP modes (incl. OWE, but without enterprise variants). Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js index 88a0aadf5e..a8069135a0 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js @@ -93,12 +93,11 @@ function handleAction(ev) { w_enc = w_sections[w_sid].encryption; w_key = w_sections[w_sid].key; w_hidden = (w_sections[w_sid].hidden == 1 ? 'true' : 'false'); - if (w_enc.startsWith('psk')) { - w_enc = 'WPA'; - } - else if (w_enc === 'none') { + if (w_enc === 'none') { w_enc = 'nopass'; w_key = 'nokey'; + } else { + w_enc = 'WPA'; } L.resolveDefault(fs.exec_direct('/usr/bin/qrencode', ['--inline', '--8bit', '--type=SVG', '--output=-', 'WIFI:S:' + w_ssid + ';T:' + w_enc + ';P:' + w_key + ';H:' + w_hidden + ';']), null).then(function (res) { if (res) {