luci-base: fix possible shell injection in luci.tools.status.switch_status()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
186e690c08
commit
9db5fa93af
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ function switch_status(devs)
|
||||||
local switches = { }
|
local switches = { }
|
||||||
for dev in devs:gmatch("[^%s,]+") do
|
for dev in devs:gmatch("[^%s,]+") do
|
||||||
local ports = { }
|
local ports = { }
|
||||||
local swc = io.popen("swconfig dev %q show" % dev, "r")
|
local swc = io.popen("swconfig dev '%s' show" % dev:gsub("'", ""), "r")
|
||||||
if swc then
|
if swc then
|
||||||
local l
|
local l
|
||||||
repeat
|
repeat
|
||||||
|
|
Loading…
Reference in a new issue