summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-10-20 22:17:23 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-10-20 22:17:23 +0200
commit8bb749ecc3b5f7f836f744f0056e90ac78522926 (patch)
tree9a461a1a779f8b2b484cee6784cd4dd2697a8193 /modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
parent6b3f804956e50b3e3afc96bd866b089d4523c6e2 (diff)
luci-mod-admin-full: protect network post actions with csrf tokens
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
index e06a88debe..685082a335 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
@@ -34,7 +34,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
legend.parentNode.style.display = 'block';
legend.style.display = 'inline';
- stxhr.get('<%=url('admin/network')%>/diag_' + tool + protocol + '/' + addr, null,
+ stxhr.post('<%=url('admin/network')%>/diag_' + tool + protocol + '/' + addr, { token: '<%=token%>' },
function(x)
{
if (x.responseText)
@@ -53,7 +53,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
}
//]]></script>
-<form method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>">
+<form method="post" action="<%=url('admin/network/diagnostics')%>">
<div class="cbi-map">
<h2 name="content"><%:Diagnostics%></h2>