Mercurial > hg > release > icedtea-web-1.4
changeset 686:9d17ddb0003f
Ensure document-base is properly encoded
author | Adam Domurad <adomurad@redhat.com> |
---|---|
date | Tue, 23 Apr 2013 13:47:42 -0400 |
parents | b16893fb126a |
children | 6b680fe9c390 |
files | ChangeLog netx/net/sourceforge/jnlp/cache/ResourceTracker.java plugin/icedteanp/java/sun/applet/PluginAppletViewer.java |
diffstat | 3 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Apr 23 13:39:45 2013 -0400 +++ b/ChangeLog Tue Apr 23 13:47:42 2013 -0400 @@ -1,3 +1,11 @@ +2013-04-23 Adam Domurad <adomurad@redhat.com> + + 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 <adomurad@redhat.com> Reproducer for URL parameters (eg ?a=b) in document-base.
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Apr 23 13:39:45 2013 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Apr 23 13:47:42 2013 -0400 @@ -398,7 +398,7 @@ 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 @@ ex.printStackTrace(); return null; // need an error exception to throw + } catch (URISyntaxException e) { + e.printStackTrace(); + return null; } }
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Tue Apr 23 13:39:45 2013 -0400 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Tue Apr 23 13:47:42 2013 -0400 @@ -439,8 +439,7 @@ 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",