From: Dirk Brenken Date: Sat, 18 Jan 2020 05:28:14 +0000 (+0100) Subject: luci-app-travelmate: bugfix add/editing WPA3 uplinks X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f57e814d9de185c51296efb61fbde8a19f95596;p=oweals%2Fluci.git luci-app-travelmate: bugfix add/editing WPA3 uplinks * see forum post https://forum.openwrt.org/t/travelmate-support-thread/5155/318 Signed-off-by: Dirk Brenken (cherry picked from commit 9ca877e08e6d23f76751fff8c458e1985bebb1f7) --- diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua index c93fdd256..03c4f5bda 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua @@ -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)) diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua index 6c0a3e186..066dccacf 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua @@ -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))