You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Joakim Sundqvist (JIRA)" <ji...@apache.org> on 2012/09/21 15:01:07 UTC

[jira] [Created] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Joakim Sundqvist created CAMEL-5632:
---------------------------------------

             Summary: 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_07
            Reporter: Joakim Sundqvist


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.





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/.'
    }

--
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

[jira] [Updated] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ 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.9.4
    
> 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

[jira] [Assigned] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-5632:
----------------------------------

    Assignee: Claus Ibsen
    
> 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
>
> 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

[jira] [Commented] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461068#comment-13461068 ] 

Claus Ibsen commented on CAMEL-5632:
------------------------------------

This is a regression introduce by CAMEL-5321
                
> 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
>
> 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

[jira] [Updated] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Description: 
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}

  was:
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.





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/.'
    }

    
> 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
>
> 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

[jira] [Updated] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Joakim Sundqvist (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joakim Sundqvist updated CAMEL-5632:
------------------------------------

    Environment: 
Mac os x 10.8.1
Java 1.7.0_07

  was:
Mac os x 10.8.1
Java 1.7_07

    
> 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
>
> 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.
> 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/.'
>     }

--
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

[jira] [Resolved] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ 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

[jira] [Updated] (CAMEL-5632) ObjectHelper.resolveUriPath is broken, can not handle: '../../' correctly

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ 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