Fix potential XSS holes

This commit is contained in:
zzz
2009-12-04 00:27:05 +00:00
parent c4e6148b9f
commit f5c1acc749
6 changed files with 18 additions and 7 deletions

View File

@ -4,6 +4,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import net.i2p.data.DataHelper;
public class NetDbHelper extends HelperBase {
private String _routerPrefix;
@ -12,7 +13,10 @@ public class NetDbHelper extends HelperBase {
public NetDbHelper() {}
public void setRouter(String r) { _routerPrefix = r; }
public void setRouter(String r) {
_routerPrefix = DataHelper.stripHTML(r); // XSS
}
public void setFull(String f) {
try {
_full = Integer.parseInt(f);