From ae9cd7a1182f853af45dc0a20b93bcdf462b97ca Mon Sep 17 00:00:00 2001 From: Lotus Date: Wed, 15 Aug 2012 14:23:21 +0200 Subject: [PATCH] fix xss bug #204 --- htroot/Network.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() );