graphs.jsp: Fix saving settings (ticket #857)

This commit is contained in:
zzz
2013-03-03 20:32:02 +00:00
parent 041da814d2
commit 77cfe0be01
3 changed files with 8 additions and 5 deletions

View File

@ -332,10 +332,10 @@ public class GraphHelper extends FormHandler {
public String getForm() { public String getForm() {
if (StatSummarizer.isDisabled()) if (StatSummarizer.isDisabled())
return ""; return "";
String prev = System.getProperty("net.i2p.router.web.GraphHelper.nonce"); // too hard to use the standard formhandler.jsi / FormHandler.java session nonces
if (prev != null) System.setProperty("net.i2p.router.web.GraphHelper.noncePrev", prev); // since graphs.jsp needs the refresh value in its <head>.
String nonce = "" + _context.random().nextLong(); // So just use the "shared/console nonce".
System.setProperty("net.i2p.router.web.GraphHelper.nonce", nonce); String nonce = CSSHelper.getNonce();
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=\"POST\">\n" + _out.write("<form action=\"graphs\" method=\"POST\">\n" +

View File

@ -1,3 +1,6 @@
2013-03-03 zzz
* graphs.jsp: Fix saving settings (ticket #857)
2013-03-03 kytv 2013-03-03 kytv
* Update geoip.txt based on Maxmind GeoLite Country database from 2013-02-19 * Update geoip.txt based on Maxmind GeoLite Country database from 2013-02-19

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 11; public final static long BUILD = 12;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";