projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
168f025
)
applications/luci-wol: fix XSS
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 24 Nov 2010 05:05:39 +0000
(
05:05
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 24 Nov 2010 05:05:39 +0000
(
05:05
+0000)
applications/luci-wol/luasrc/model/cbi/wol.lua
patch
|
blob
|
history
diff --git
a/applications/luci-wol/luasrc/model/cbi/wol.lua
b/applications/luci-wol/luasrc/model/cbi/wol.lua
index ac73919e220c5e0e52f84f427552985b10ff842b..30467f43090273e60bc389d7fe849b288c7afdb9 100644
(file)
--- a/
applications/luci-wol/luasrc/model/cbi/wol.lua
+++ b/
applications/luci-wol/luasrc/model/cbi/wol.lua
@@
-48,7
+48,7
@@
if has_ewk then
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
@@
-86,7
+86,7
@@
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"
@@
-127,4
+127,3
@@
end
return m
-