end
iface:value("", translate("Broadcast on all interfaces"))
-
+
for _, e in ipairs(sys.net.devices()) do
if e ~= "lo" then iface:value(e) end
end
function host.write(self, s, val)
local host = luci.http.formvalue("cbid.wol.1.mac")
- if host and #host > 0 then
+ if host and #host > 0 and host:match("^[a-fA-F0-9:]+$") then
local cmd
local util = luci.http.formvalue("cbid.wol.1.binary") or (
has_ewk and "/usr/bin/etherwake" or "/usr/bin/wol"
return m
-