diff options
Diffstat (limited to 'modules/luci-base/luasrc/dispatcher.lua')
-rw-r--r-- | modules/luci-base/luasrc/dispatcher.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index d4293422b5..48e125e4ae 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -305,7 +305,7 @@ local function tree_to_json(node, json) elseif subname == "rpc" and subnode.module == "luci.controller.rpc" then spec.auth = { login = false, - methods = { "param:auth", "cookie:sysauth" } + methods = { "query:auth", "cookie:sysauth" } } elseif subnode.module == "luci.controller.admin.uci" then spec.auth = { @@ -546,6 +546,8 @@ local function check_authentication(method) sid = http.getcookie(auth_param) elseif auth_type == "param" then sid = http.formvalue(auth_param) + elseif auth_type == "query" then + sid = http.formvalue(auth_param, true) end return session_retrieve(sid) @@ -621,6 +623,14 @@ local function merge_trees(node_a, node_b) node_a[k] = v end end + + if type(node_a.action) == "table" and + node_a.action.type == "firstchild" and + node_a.children == nil + then + node_a.satisfied = false + end + return node_a end |