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 <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2023-05-08 16:25:01 +02:00
parent 7b75148fe5
commit 081906f4bf
No known key found for this signature in database
GPG key ID: 9D71CD547BFAE684

View file

@ -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) {