summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-openwrt/luasrc/view
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 /themes/luci-theme-openwrt/luasrc/view
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 'themes/luci-theme-openwrt/luasrc/view')
-rw-r--r--themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
index ae348f385..d6db8e885 100644
--- a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
+++ b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
@@ -104,7 +104,7 @@
if ucic > 0 then
write('<a class="warning" href="%s?redir=%s">%s: %d</a>' %{
url(category, 'uci/changes'),
- http.urlencode(http.formvalue('redir') or REQUEST_URI),
+ http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
translate('Unsaved Changes'),
ucic
})