diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-05 22:37:37 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-05 23:03:01 +0200 |
commit | 731ed77c0bbee7004a6b5645d9a8592a76748a1c (patch) | |
tree | 682ae002e3459c55d5a66724c11e74507e71ea94 /themes/luci-theme-bootstrap/luasrc | |
parent | 7b04d0bbcf0f34393f20ccad8884a67fea9e2863 (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.htm | 2 |
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 }) |