[
https://issues.apache.org/jira/browse/FELIX-6416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Piotr Klimczak updated FELIX-6416:
----------------------------------
Description:
'#' sign represents URL fragment and is not valid URL path element.
As per spec it is not allowed for it to be a part of path and instead must be
URL escaped.
So for example for file in location in UNIX systems:
"/Users/piotrklimczak/test#", the valid URL encoding to load it in Java is:
new File(new URL("file:///Users/piotrklimczak/test%23").toURI())
FELIX-6326 effectively allows '#' to be accepted as valid URL path element,
which in turn breaks JDK9+ URLClassLoader which is using URL fragment (ref) to
deal with multi-release jars.
This then breaks pax-transx-tm-narayana installation in Karaf 4.3.1 (which uses
URLClassLoader).
In my opinion FELIX-6326 should be reverted and users should be instead
encoding correctly special characters in their resource paths.
was:
'#' sign represents URL fragment and is not valid URL path element.
As per spec it is not allowed for it to be a part of path and instead must be
URL escaped.
So for example for file in location in UNIX systems:
"/Users/piotrklimczak/test#", the valid URL encoding to load it in Java is:
new File(new URL("file:///Users/piotrklimczak/test%23").toURI())
FELIX-6326 effectively allows '#' to be accepted as valid URL path element,
which in turn breaks JDK9+ URLClassLoader which is using URL fragment (ref) to
deal with multi-release jars.
This then breaks pax-transx-tm-narayana installation in Karaf (which uses
URLClassLoader).
In my opinion FELIX-6326 should be reverted and users should be instead
encoding correctly special characters in their resource paths.
> FELIX-6326 breaks JDK9+ URLClassLoader by allowing incorrect URL paths
> ----------------------------------------------------------------------
>
> Key: FELIX-6416
> URL: https://issues.apache.org/jira/browse/FELIX-6416
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-6.0.4
> Environment: MacOS
> Reporter: Piotr Klimczak
> Priority: Blocker
>
> '#' sign represents URL fragment and is not valid URL path element.
> As per spec it is not allowed for it to be a part of path and instead must be
> URL escaped.
> So for example for file in location in UNIX systems:
> "/Users/piotrklimczak/test#", the valid URL encoding to load it in Java is:
> new File(new URL("file:///Users/piotrklimczak/test%23").toURI())
> FELIX-6326 effectively allows '#' to be accepted as valid URL path element,
> which in turn breaks JDK9+ URLClassLoader which is using URL fragment (ref)
> to deal with multi-release jars.
> This then breaks pax-transx-tm-narayana installation in Karaf 4.3.1 (which
> uses URLClassLoader).
> In my opinion FELIX-6326 should be reverted and users should be instead
> encoding correctly special characters in their resource paths.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)