summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-22 21:52:36 +0000
committerSteven Barth <steven@midlink.org>2008-08-22 21:52:36 +0000
commit20116047b091a26fbc62e028edea89418ed3223c (patch)
tree1e7151463e555b67828033a3d9c4060a5f7ff36a /libs
parent830ca24abba0ec45618c0121306461fc50c2b7bd (diff)
Fix unhandled track values for leafs
Diffstat (limited to 'libs')
-rw-r--r--libs/web/luasrc/dispatcher.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 2de5ea4b1..3e2163148 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -125,18 +125,23 @@ function dispatch(request)
local c = context.tree
local track = {}
local args = {}
+ context.args = context.path
local n
for i, s in ipairs(request) do
c = c.nodes[s]
n = i
- if not c or c.leaf then
+ if not c then
break
end
for k, v in pairs(c) do
track[k] = v
end
+
+ if c.leaf then
+ break
+ end
end
if c and c.leaf then
@@ -184,6 +189,7 @@ function dispatch(request)
if authen then
local user = authen(luci.sys.user.checkpasswd, def)
if not user or not luci.util.contains(accs, user) then
+ luci.http.status(403, "Forbidden")
return
else
local sid = luci.sys.uniqueid(16)