Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix xss bug #204

Lotusae9cd7a1182f
diff --git a/htroot/Network.java b/htroot/Network.java
index 87fe56bcb..0354338a9 100644
--- a/htroot/Network.java
+++ b/htroot/Network.java
@@ -368,9 +368,9 @@ public class Network {
location = ClientIdentification.generateLocation();
} else {
userAgent = sb.peers.peerActions.getUserAgent(seed.getIP());
- location = ClientIdentification.parseLocationInUserAgent(userAgent);
+ location = ClientIdentification.parseLocationInUserAgent(userAgent).substring(0, 10);
}
- prop.put(STR_TABLE_LIST + conCount + "_location", location);
+ prop.putHTML(STR_TABLE_LIST + conCount + "_location", location);
if (complete) {
prop.put(STR_TABLE_LIST + conCount + "_complete", 1);
prop.put(STR_TABLE_LIST + conCount + "_complete_ip", seed.getIP() );