X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fdispatcher.lua;h=c7903e6384e7a2f07f2952d352fddbf02aee9f25;hp=cd5d77a12b9237134d66be1e1d6174d03efdd01a;hb=dd0848b3fa9a0a219b32d0d8494a0973a948353a;hpb=2a9b2107ba9fec08e7883e7eeb13bd37c555c623 diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index cd5d77a12..c7903e638 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -273,6 +273,13 @@ function dispatch(request) if cond then local env = getfenv(3) local scope = (type(env.self) == "table") and env.self + if type(val) == "table" then + if not next(val) then + return '' + else + val = util.serialize_json(val) + end + end return string.format( ' %s="%s"', tostring(key), util.pcdata(tostring( val @@ -317,7 +324,7 @@ function dispatch(request) "Access Violation\nThe page at '" .. table.concat(request, "/") .. "/' " .. "has no parent node so the access to this location has been denied.\n" .. "This is a software bug, please report this message at " .. - "http://luci.subsignal.org/trac/newticket" + "https://github.com/openwrt/luci/issues" ) if track.sysauth then @@ -402,9 +409,6 @@ function dispatch(request) end if track.setuser then - -- trigger ubus connection before dropping root privs - util.ubus() - sys.process.setuser(track.setuser) end