You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/09/22 11:46:08 UTC
[jira] [Resolved] (CAMEL-5632) ObjectHelper.resolveUriPath is
broken, can not handle: '../../' correctly
[ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-5632.
--------------------------------
Resolution: Fixed
Also fixed an issue with using multiple back paths, eg "../../../foo"
> ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly
> --------------------------------------------------------------------------
>
> Key: CAMEL-5632
> URL: https://issues.apache.org/jira/browse/CAMEL-5632
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.1
> Environment: Mac os x 10.8.1
> Java 1.7.0_07
> Reporter: Joakim Sundqvist
> Assignee: Claus Ibsen
> Fix For: 2.9.4, 2.11.0, 2.10.2
>
>
> In my xsl-files I have imports and includes that resides in folders a few levels up.
> Ex:
> <xsl:include href="../../common/myfunctions.xsl"/>
> When camel starts up and tries to resolve the paths it crashes because of the current implementation in ObjectHelper.resolveUriPath(..)
> Made a simple testcase that demonstrates my problem.
> {code}
> public void testResolveUriPath() throws Exception {
> assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/../")); // OK
> assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/../two/../")); // OK
> assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/")); // OK
> assertEquals("", ObjectHelper.resolveUriPath("./")); // OK
> assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/two/../../")); // Fails, gives 'xslt/one/.'
> assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/two/../.././"));// Fails, gives 'xslt/one/.'
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira