diff --git a/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua b/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua index a3ac089d..e8c9976d 100644 --- a/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua +++ b/package/gluon-config-mode-geo-location/files/lib/gluon/config-mode/wizard/0400-geo-location.lua @@ -45,10 +45,10 @@ function M.handle(data) uci:set("gluon-node-info", sname, "share_location", data._location) if data._location and data._latitude ~= nil and data._longitude ~= nil then - uci:set("gluon-node-info", sname, "latitude", data._latitude) - uci:set("gluon-node-info", sname, "longitude", data._longitude) + uci:set("gluon-node-info", sname, "latitude", data._latitude:trim()) + uci:set("gluon-node-info", sname, "longitude", data._longitude:trim()) if data._altitude ~= nil then - uci:set("gluon-node-info", sname, "altitude", data._altitude) + uci:set("gluon-node-info", sname, "altitude", data._altitude:trim()) else uci:delete("gluon-node-info", sname, "altitude") end diff --git a/package/gluon-config-mode-mesh-vpn/files/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/files/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua index 9e2f4008..104e2437 100644 --- a/package/gluon-config-mode-mesh-vpn/files/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua +++ b/package/gluon-config-mode-mesh-vpn/files/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua @@ -28,13 +28,13 @@ function M.section(form) o:depends("_limit_enabled", "1") o.value = uci:get("simple-tc", "mesh_vpn", "limit_ingress") o.rmempty = false - o.datatype = "integer" + o.datatype = "uinteger" o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)")) o:depends("_limit_enabled", "1") o.value = uci:get("simple-tc", "mesh_vpn", "limit_egress") o.rmempty = false - o.datatype = "integer" + o.datatype = "uinteger" end function M.handle(data) @@ -49,11 +49,11 @@ function M.handle(data) uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn") if data._limit_ingress ~= nil then - uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress) + uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress:trim()) end if data._limit_egress ~= nil then - uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress) + uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress:trim()) end uci:commit("simple-tc") diff --git a/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua b/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua index c9b57d4b..994f3077 100644 --- a/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua +++ b/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua @@ -99,9 +99,9 @@ function f.handle(self, state, data) if state == FORM_VALID then uci:set("network", "wan", "proto", data.ipv4) if data.ipv4 == "static" then - uci:set("network", "wan", "ipaddr", data.ipv4_addr) - uci:set("network", "wan", "netmask", data.ipv4_netmask) - uci:set("network", "wan", "gateway", data.ipv4_gateway) + uci:set("network", "wan", "ipaddr", data.ipv4_addr:trim()) + uci:set("network", "wan", "netmask", data.ipv4_netmask:trim()) + uci:set("network", "wan", "gateway", data.ipv4_gateway:trim()) else uci:delete("network", "wan", "ipaddr") uci:delete("network", "wan", "netmask") @@ -110,8 +110,8 @@ function f.handle(self, state, data) uci:set("network", "wan6", "proto", data.ipv6) if data.ipv6 == "static" then - uci:set("network", "wan6", "ip6addr", data.ipv6_addr) - uci:set("network", "wan6", "ip6gw", data.ipv6_gateway) + uci:set("network", "wan6", "ip6addr", data.ipv6_addr:trim()) + uci:set("network", "wan6", "ip6gw", data.ipv6_gateway:trim()) else uci:delete("network", "wan6", "ip6addr") uci:delete("network", "wan6", "ip6gw")