diff --git a/main/src/com/google/gridworks/commands/project/ImportProjectCommand.java b/main/src/com/google/gridworks/commands/project/ImportProjectCommand.java index 586b7c8e4..93fe6ff2d 100644 --- a/main/src/com/google/gridworks/commands/project/ImportProjectCommand.java +++ b/main/src/com/google/gridworks/commands/project/ImportProjectCommand.java @@ -53,7 +53,7 @@ public class ImportProjectCommand extends Command { redirect(response, "/project?project=" + projectID); } else { - redirect(response, "/error.html?redirect=index.html&msg=" + + redirect(response, "/error.html?redirect=index&msg=" + ParsingUtilities.encode("Failed to import project") ); } diff --git a/main/webapp/WEB-INF/lib-src/json-20100208-sources.jar b/main/webapp/WEB-INF/lib-src/json-20100208-sources.jar index 031edca3d..f1c67ac8b 100644 Binary files a/main/webapp/WEB-INF/lib-src/json-20100208-sources.jar and b/main/webapp/WEB-INF/lib-src/json-20100208-sources.jar differ diff --git a/main/webapp/WEB-INF/lib-src/patches/json-20100208.patch b/main/webapp/WEB-INF/lib-src/patches/json-20100208.patch new file mode 100644 index 000000000..07cd1032e --- /dev/null +++ b/main/webapp/WEB-INF/lib-src/patches/json-20100208.patch @@ -0,0 +1,43 @@ +diff -rupN org/json/JSONWriter.java json/src/org/json/JSONWriter.java +--- org/json/JSONWriter.java 2010-01-30 15:13:38.000000000 -0800 ++++ json/src/org/json/JSONWriter.java 2010-09-16 16:59:11.000000000 -0700 +@@ -57,7 +57,7 @@ SOFTWARE. + * @version 2008-09-22 + */ + public class JSONWriter { +- private static final int maxdepth = 20; ++ private static final int maxdepth = 100; + + /** + * The comma flag determines if a comma should be output before the next +@@ -91,12 +91,19 @@ public class JSONWriter { + protected Writer writer; + + /** +- * Make a fresh JSONWriter. It can be used to build one JSON text. ++ * Make a fresh JSONWriter at the default maximum depth. It can be used to build one JSON text. + */ + public JSONWriter(Writer w) { ++ this(w, maxdepth); ++ } ++ ++ /** ++ * Make a fresh JSONWriter at the given maximum depth. It can be used to build one JSON text. ++ */ ++ public JSONWriter(Writer w, int depth) { + this.comma = false; + this.mode = 'i'; +- this.stack = new JSONObject[maxdepth]; ++ this.stack = new JSONObject[depth]; + this.top = 0; + this.writer = w; + } +@@ -268,7 +275,7 @@ public class JSONWriter { + * @throws JSONException If nesting is too deep. + */ + private void push(JSONObject jo) throws JSONException { +- if (this.top >= maxdepth) { ++ if (this.top >= this.stack.length) { + throw new JSONException("Nesting too deep."); + } + this.stack[this.top] = jo; diff --git a/main/webapp/WEB-INF/lib/json-20100208.jar b/main/webapp/WEB-INF/lib/json-20100208.jar index 7a73fe438..fa95275c6 100644 Binary files a/main/webapp/WEB-INF/lib/json-20100208.jar and b/main/webapp/WEB-INF/lib/json-20100208.jar differ