forked from I2P_Developers/i2p.i2p
findbugs all over
This commit is contained in:
@ -186,17 +186,18 @@ public class KeyStoreProvider {
|
||||
if (_keystore == null) {
|
||||
File keyStoreFile = new File(getKeyStoreLocation());
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
_keystore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||
if (keyStoreFile.exists()) {
|
||||
InputStream is = new FileInputStream(keyStoreFile);
|
||||
is = new FileInputStream(keyStoreFile);
|
||||
_keystore.load(is, DEFAULT_KEYSTORE_PASSWORD.toCharArray());
|
||||
return _keystore;
|
||||
}
|
||||
|
||||
initialize();
|
||||
if (keyStoreFile.exists()) {
|
||||
InputStream is = new FileInputStream(keyStoreFile);
|
||||
is = new FileInputStream(keyStoreFile);
|
||||
_keystore.load(is, DEFAULT_KEYSTORE_PASSWORD.toCharArray());
|
||||
return _keystore;
|
||||
} else {
|
||||
@ -204,6 +205,8 @@ public class KeyStoreProvider {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Ignore. Not an issue. Let's just create a new keystore instead.
|
||||
} finally {
|
||||
if (is != null) try { is.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
|
@ -323,8 +323,6 @@ public class Analysis extends JobImpl implements RouterApp {
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Analyzing " + ris.size() + " routers, including non-floodfills? " + includeAll);
|
||||
|
||||
double avgMinDist = getAvgMinDist(ris);
|
||||
|
||||
// IP analysis
|
||||
calculateIPGroupsFamily(ris, points);
|
||||
List<RouterInfo> ri32 = new ArrayList<RouterInfo>(4);
|
||||
|
@ -34,7 +34,7 @@ public class HomeHelper extends HelperBase {
|
||||
static final String PROP_MONITORING = "routerconsole.monitoring";
|
||||
static final String PROP_OLDHOME = "routerconsole.oldHomePage";
|
||||
private static final String PROP_SEARCH = "routerconsole.showSearch";
|
||||
public final String bottomWrap = "<br>\n" +
|
||||
private static final String bottomWrap = "<br>\n" +
|
||||
"<div class=\"clearer\"> </div>\n" +
|
||||
"</div>\n" +
|
||||
"</div>\n";
|
||||
|
@ -60,7 +60,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
<b>URL:</b>
|
||||
<%
|
||||
String url = request.getParameter("pluginURL");
|
||||
String value = url != null ? "value=\"" + url + '"' : "";
|
||||
String value = url != null ? "value=\"" + net.i2p.data.DataHelper.escapeHTML(url) + '"' : "";
|
||||
%>
|
||||
<input type="text" size="60" name="pluginURL" title="<%=intl._t("To install a plugin, enter the download URL:")%>" <%=value%>>
|
||||
</td>
|
||||
@ -84,7 +84,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
String file = request.getParameter("pluginFile");
|
||||
if (file != null && file.length() > 0) {
|
||||
%>
|
||||
<input type="text" size="60" name="pluginFile" value="<%=file%>">
|
||||
<input type="text" size="60" name="pluginFile" value="<%=net.i2p.data.DataHelper.escapeHTML(file)%>">
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
|
@ -70,7 +70,7 @@
|
||||
<b><%=intl._t("Enter zip or su3 URL")%>:</b>
|
||||
<%
|
||||
String url = request.getParameter("url");
|
||||
String value = url != null ? "value=\"" + url + '"' : "";
|
||||
String value = url != null ? "value=\"" + net.i2p.data.DataHelper.escapeHTML(url) + '"' : "";
|
||||
%>
|
||||
<input name="url" type="text" size="60" <%=value%> />
|
||||
</td>
|
||||
@ -93,7 +93,7 @@
|
||||
String file = request.getParameter("file");
|
||||
if (file != null && file.length() > 0) {
|
||||
%>
|
||||
<input type="text" size="60" name="file" value="<%=file%>">
|
||||
<input type="text" size="60" name="file" value="<%=net.i2p.data.DataHelper.escapeHTML(file)%>">
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
|
@ -38,6 +38,11 @@ if ( !rendered && ((rs != null) || fakeBw) ) {
|
||||
if (!fakeBw)
|
||||
rate = rs.getRate(per);
|
||||
if ( (rate != null) || (fakeBw) ) {
|
||||
if (stat != null &&
|
||||
(stat.indexOf('\n') >= 0 || stat.indexOf('\r') >= 0)) {
|
||||
response.sendError(403, "param");
|
||||
return;
|
||||
}
|
||||
java.io.OutputStream cout = response.getOutputStream();
|
||||
String format = request.getParameter("format");
|
||||
response.setHeader("X-Content-Type-Options", "nosniff");
|
||||
|
@ -1656,7 +1656,6 @@ class Connection {
|
||||
return false;
|
||||
}
|
||||
|
||||
long now = _context.clock().now();
|
||||
_context.statManager().addRateData("stream.fastRetransmit", _packet.getLifetime(), _packet.getLifetime());
|
||||
|
||||
// revamp various fields, in case we need to ack more, etc
|
||||
|
@ -3092,10 +3092,10 @@ public class WebMail extends HttpServlet
|
||||
*/
|
||||
private static void showLogin( PrintWriter out )
|
||||
{
|
||||
boolean fixed = Boolean.parseBoolean(Config.getProperty( CONFIG_PORTS_FIXED, "true" ));
|
||||
String host = Config.getProperty(CONFIG_HOST, DEFAULT_HOST);
|
||||
String pop3 = Config.getProperty(CONFIG_PORTS_POP3, Integer.toString(DEFAULT_POP3PORT));
|
||||
String smtp = Config.getProperty(CONFIG_PORTS_SMTP, Integer.toString(DEFAULT_SMTPPORT));
|
||||
//boolean fixed = Boolean.parseBoolean(Config.getProperty( CONFIG_PORTS_FIXED, "true" ));
|
||||
//String host = Config.getProperty(CONFIG_HOST, DEFAULT_HOST);
|
||||
//String pop3 = Config.getProperty(CONFIG_PORTS_POP3, Integer.toString(DEFAULT_POP3PORT));
|
||||
//String smtp = Config.getProperty(CONFIG_PORTS_SMTP, Integer.toString(DEFAULT_SMTPPORT));
|
||||
|
||||
out.println( "<div id=\"dologin\"><h1>" + _t("Email Login") + "</h1><table cellspacing=\"3\" cellpadding=\"5\">\n" +
|
||||
// current postman hq length limits 16/12, new postman version 32/32
|
||||
|
Reference in New Issue
Block a user