Author: toad
Date: 2006-05-18 14:11:49 +0000 (Thu, 18 May 2006)
New Revision: 8769
Modified:
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
trunk/freenet/src/freenet/node/Version.java
Log:
721: Fix NPE in filter. (#362).
Modified:
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
---
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
2006-05-18 14:06:45 UTC (rev 8768)
+++
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
2006-05-18 14:11:49 UTC (rev 8769)
@@ -57,7 +57,7 @@
// mailto: not supported yet - FIXME what to do with it? what
queries are allowed? can it possibly hurt us? how to construct safely? etc
HTTPRequest req = new HTTPRequest(uri);
- if (path.equals("/") && req.isParameterSet("newbookmark")) {
+ if (path != null && path.equals("/") &&
req.isParameterSet("newbookmark")) {
// allow links to the root to add bookmarks
String bookmark_key = req.getParam("newbookmark");
String bookmark_desc = req.getParam("desc");
@@ -71,6 +71,7 @@
// Probably a relative URI.
String rpath = resolved.getPath();
+ if(rpath == null) return null;
Logger.minor(this, "Resolved URI: "+rpath);
// Valid FreenetURI?
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-05-18 14:06:45 UTC (rev
8768)
+++ trunk/freenet/src/freenet/node/Version.java 2006-05-18 14:11:49 UTC (rev
8769)
@@ -18,7 +18,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 720;
+ private static final int buildNumber = 721;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 698;