summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-freifunk-generic/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-freifunk-generic/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-freifunk-generic/luasrc/view')
-rw-r--r--themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
index 342a9d408..818565528 100644
--- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
+++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
@@ -205,7 +205,7 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
-%>
<div id="savemenu">
<% if ucic > 0 then %>
- <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><%:Unsaved Changes%>: <%=ucic%></a>
+ <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%:Unsaved Changes%>: <%=ucic%></a>
<% end -%>
</div>
<% end %>