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

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

escape referer

parent c901010d
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ import java.util.StringTokenizer;
import net.i2p.I2PAppContext;
import net.i2p.client.naming.NamingService;
import net.i2p.data.DataFormatException;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.i2ptunnel.I2PTunnelHTTPClient;
import net.i2p.util.FileUtil;
......@@ -165,7 +166,8 @@ public abstract class LocalHTTPServer {
Properties nsOptions = new Properties();
nsOptions.setProperty("list", book);
if (referer != null && referer.startsWith("http")) {
String from = "<a href=\"" + referer + "\">" + referer + "</a>";
String ref = DataHelper.escapeHTML(referer);
String from = "<a href=\"" + ref + "\">" + ref + "</a>";
nsOptions.setProperty("s", _t("Added via address helper from {0}", from));
} else {
nsOptions.setProperty("s", _t("Added via address helper"));
......
......@@ -18,10 +18,10 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 23;
public final static long BUILD = 24;
/** for example "-test" */
public final static String EXTRA = "";
public final static String EXTRA = "-rc";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);
......
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