camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly
Date Sat, 22 Sep 2012 08:46:09 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-5632:
-------------------------------

    Fix Version/s: 2.10.2
                   2.11.0
    
> 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

Mime
View raw message