aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--netx/net/sourceforge/jnlp/cache/ResourceTracker.java5
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java3
3 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dfa308..08214a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2013-04-23 Adam Domurad <[email protected]>
+ Ensure document-base is properly encoded.
+ * netx/net/sourceforge/jnlp/cache/ResourceTracker.java
+ (getCacheFile): Use URL#toUri().getPath() instead of URL#getFile().
+ * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+ (handleInitializationMessage): Don't decode document-base.
+
+2013-04-23 Adam Domurad <[email protected]>
+
Reproducer for URL parameters (eg ?a=b) in document-base.
* tests/reproducers/simple/URLParametersInDocumentBase/resources/URLParametersInDocumentBase.html:
Page that loads applet.
diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
index 898594f..36ef3c6 100644
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
+++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java
@@ -398,7 +398,7 @@ public class ResourceTracker {
return resource.localFile;
if (location.getProtocol().equalsIgnoreCase("file")) {
- File file = new File(location.getFile());
+ File file = new File(location.toURI().getPath());
if (file.exists())
return file;
}
@@ -409,6 +409,9 @@ public class ResourceTracker {
ex.printStackTrace();
return null; // need an error exception to throw
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ return null;
}
}
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
index 9151d5e..2951b13 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
@@ -439,8 +439,7 @@ public class PluginAppletViewer extends XEmbeddedFrame
String height = msgParts[2];
int spaceLocation = message.indexOf(' ', "tag".length() + 1);
- String documentBase =
- UrlUtil.decode(message.substring("tag".length() + 1, spaceLocation));
+ String documentBase = message.substring("tag".length() + 1, spaceLocation);
String paramString = message.substring(spaceLocation + 1);
PluginDebug.debug("Handle = ", handle, "\n",