luci-app-travelmate: bugfix add/editing WPA3 uplinks
authorDirk Brenken <dev@brenken.org>
Sat, 18 Jan 2020 05:28:14 +0000 (06:28 +0100)
committerDirk Brenken <dev@brenken.org>
Sat, 18 Jan 2020 06:42:16 +0000 (07:42 +0100)
* see forum post
https://forum.openwrt.org/t/travelmate-support-thread/5155/318

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 9ca877e08e6d23f76751fff8c458e1985bebb1f7)

applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua

index c93fdd25697f4ea5e37b474c1cd59377c35de938..03c4f5bda2b09c340220b806a3598f36005d25fb 100644 (file)
@@ -199,7 +199,7 @@ function wssid.write(self, section, value)
                elseif encr:formvalue(section) ~= "owe" then
                        uci:set("wireless", newsection, "key", wkey:formvalue(section) or "")
                end
-               if ciph and ciph:formvalue(section) ~= "auto" then
+               if ciph and ciph:formvalue(section) and ciph:formvalue(section) ~= "auto" then
                        uci:set("wireless", newsection, "encryption", encr:formvalue(section) .. "+" .. ciph:formvalue(section))
                else
                        uci:set("wireless", newsection, "encryption", encr:formvalue(section))
index 6c0a3e186e295ee85d60b8af0699c42b2fb1c489..066dccacfd6a0ca47321b66260b1b3ad405ac08d 100644 (file)
@@ -182,7 +182,7 @@ function wssid.write(self, section, value)
                elseif encr:formvalue(section) ~= "owe" then
                        uci:set("wireless", m.hidden.cfg, "key", wkey:formvalue(section) or "")
                end
-               if ciph and ciph:formvalue(section) ~= "auto" then
+               if ciph and ciph:formvalue(section) and ciph:formvalue(section) ~= "auto" then
                        uci:set("wireless", m.hidden.cfg, "encryption", encr:formvalue(section) .. "+" .. ciph:formvalue(section))
                else
                        uci:set("wireless", m.hidden.cfg, "encryption", encr:formvalue(section))