summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/controller
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-05 22:37:37 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-05 23:03:01 +0200
commit731ed77c0bbee7004a6b5645d9a8592a76748a1c (patch)
tree682ae002e3459c55d5a66724c11e74507e71ea94 /modules/luci-mod-admin-full/luasrc/controller
parent7b04d0bbcf0f34393f20ccad8884a67fea9e2863 (diff)
treewide: improve handling of page redirections in uci change views
Instead of passing the full LuCI request url, pass the relative resolved request path instead and filter the received value through the lookup() dispatcher function to only allow paths to actual internal pages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller')
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua
index 9c33d9c18..c3bf66852 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua
@@ -5,8 +5,7 @@
module("luci.controller.admin.uci", package.seeall)
function index()
- local redir = luci.http.formvalue("redir", true) or
- luci.dispatcher.build_url(unpack(luci.dispatcher.context.request))
+ local redir = luci.http.formvalue("redir", true) or table.concat(disp.context.request, "/")
entry({"admin", "uci"}, nil, _("Configuration"))
entry({"admin", "uci", "changes"}, call("action_changes"), _("Changes"), 40).query = {redir=redir}