I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 6b0c9312 authored by zzz's avatar zzz
Browse files

change buttons from GET to POST

parent dd39f3f2
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ public class ConfigRestartBean { ...@@ -81,7 +81,7 @@ public class ConfigRestartBean {
/** @param s value,label,... pairs */ /** @param s value,label,... pairs */
private static void buttons(RouterContext ctx, StringBuilder buf, String url, String nonce, String[] s) { private static void buttons(RouterContext ctx, StringBuilder buf, String url, String nonce, String[] s) {
buf.append("<form action=\"").append(url).append("\" method=\"GET\">\n"); buf.append("<form action=\"").append(url).append("\" method=\"POST\">\n");
buf.append("<input type=\"hidden\" name=\"consoleNonce\" value=\"").append(nonce).append("\" >\n"); buf.append("<input type=\"hidden\" name=\"consoleNonce\" value=\"").append(nonce).append("\" >\n");
for (int i = 0; i < s.length; i+= 2) for (int i = 0; i < s.length; i+= 2)
buf.append("<button type=\"submit\" name=\"action\" value=\"").append(s[i]).append("\" >").append(_(s[i+1], ctx)).append("</button>\n"); buf.append("<button type=\"submit\" name=\"action\" value=\"").append(s[i]).append("\" >").append(_(s[i+1], ctx)).append("</button>\n");
......
...@@ -128,7 +128,7 @@ public class GraphHelper extends HelperBase { ...@@ -128,7 +128,7 @@ public class GraphHelper extends HelperBase {
saveSettings(); saveSettings();
try { try {
_out.write("<br><h3>" + _("Configure Graph Display") + " [<a href=\"configstats\">" + _("Select Stats") + "</a>]</h3>"); _out.write("<br><h3>" + _("Configure Graph Display") + " [<a href=\"configstats\">" + _("Select Stats") + "</a>]</h3>");
_out.write("<form action=\"graphs\" method=\"GET\">"); _out.write("<form action=\"graphs\" method=\"POST\">");
_out.write(_("Periods") + ": <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n"); _out.write(_("Periods") + ": <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
_out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + "> "); _out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + "> ");
_out.write(_("or")+ " " +_("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + "><br>\n"); _out.write(_("or")+ " " +_("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + "><br>\n");
......
...@@ -220,7 +220,7 @@ public class SummaryBarRenderer { ...@@ -220,7 +220,7 @@ public class SummaryBarRenderer {
System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.UpdateHandler.nonce", nonce+""); System.setProperty("net.i2p.router.web.UpdateHandler.nonce", nonce+"");
String uri = _helper.getRequestURI(); String uri = _helper.getRequestURI();
buf.append("<p><form action=\"").append(uri).append("\" method=\"GET\">\n"); buf.append("<p><form action=\"").append(uri).append("\" method=\"POST\">\n");
buf.append("<input type=\"hidden\" name=\"updateNonce\" value=\"").append(nonce).append("\" >\n"); buf.append("<input type=\"hidden\" name=\"updateNonce\" value=\"").append(nonce).append("\" >\n");
if (_helper.updateAvailable()) { if (_helper.updateAvailable()) {
buf.append("<button type=\"submit\" name=\"updateAction\" value=\"signed\" >") buf.append("<button type=\"submit\" name=\"updateAction\" value=\"signed\" >")
...@@ -320,7 +320,7 @@ public class SummaryBarRenderer { ...@@ -320,7 +320,7 @@ public class SummaryBarRenderer {
if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+""); System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
String uri = _helper.getRequestURI(); String uri = _helper.getRequestURI();
buf.append("<p><form action=\"").append(uri).append("\" method=\"GET\">\n"); buf.append("<p><form action=\"").append(uri).append("\" method=\"POST\">\n");
buf.append("<input type=\"hidden\" name=\"reseedNonce\" value=\"").append(nonce).append("\" >\n"); buf.append("<input type=\"hidden\" name=\"reseedNonce\" value=\"").append(nonce).append("\" >\n");
buf.append("<button type=\"submit\" value=\"Reseed\" >").append(_("Reseed")).append("</button></form></p>\n"); buf.append("<button type=\"submit\" value=\"Reseed\" >").append(_("Reseed")).append("</button></form></p>\n");
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} else { } else {
// since we don't have an iframe this will reload the base page, and // since we don't have an iframe this will reload the base page, and
// the new delay will be passed to the iframe above // the new delay will be passed to the iframe above
out.print("<div class=\"refresh\"><form action=\"" + request.getRequestURI() + "\" method=\"GET\">\n"); out.print("<div class=\"refresh\"><form action=\"" + request.getRequestURI() + "\" method=\"POST\">\n");
out.print("<b>"); out.print("<b>");
// We have intl defined when this is included, but not when compiled standalone. // We have intl defined when this is included, but not when compiled standalone.
out.print(intl._("Refresh (s)")); out.print(intl._("Refresh (s)"));
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<% <%
// d and shutdownSoon defined above // d and shutdownSoon defined above
if (!shutdownSoon) { if (!shutdownSoon) {
out.print("<div class=\"refresh\"><form action=\"summaryframe.jsp\" method=\"GET\">\n"); out.print("<div class=\"refresh\"><form action=\"summaryframe.jsp\" method=\"POST\">\n");
if ("0".equals(d)) { if ("0".equals(d)) {
out.print("<b>"); out.print("<b>");
out.print(intl._("Refresh (s)")); out.print(intl._("Refresh (s)"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment