Fix potential XSS holes
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user