summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-bootstrap/luasrc
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-bootstrap/luasrc
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-bootstrap/luasrc')
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
index 78b98e0355..0441c9583e 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
@@ -147,7 +147,7 @@
if ucichanges > 0 then
write('<a class="label notice" 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'),
ucichanges
})