You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Rob ten Hove (Created) (JIRA)" <ji...@apache.org> on 2012/03/23 16:47:26 UTC

[jira] [Created] (CXF-4200) UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()

UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()
----------------------------------------------------------------------------

                 Key: CXF-4200
                 URL: https://issues.apache.org/jira/browse/CXF-4200
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.5.2, 2.6
            Reporter: Rob ten Hove
            Priority: Minor


The function 'UriInfoImpl.getPathSegments(boolean decode)' calls 'getPath()' internally. It should call 'getPath(decode)' instead.

As an example, consider the following path: 'a/x%2fy/b' ('%2f' = '/').
When calling 'UriInfoImpl.getPathSegments(true)', four path segments are returned: 'a', 'x', 'y', 'b'. However, when 'UriInfoImpl.getPathSegments(false)' is called, the result is the same. Instead, 'a', 'x%2fy', 'b' is expected.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4200) UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()

Posted by "Sergey Beryozkin (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-4200.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6
                   2.5.3
                   2.4.7
                   2.3.10
         Assignee: Sergey Beryozkin
    
> UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()
> ----------------------------------------------------------------------------
>
>                 Key: CXF-4200
>                 URL: https://issues.apache.org/jira/browse/CXF-4200
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.2, 2.6
>            Reporter: Rob ten Hove
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 2.3.10, 2.4.7, 2.5.3, 2.6
>
>         Attachments: cxf-4200-robth-getpathsegments-decode.patch
>
>
> The function 'UriInfoImpl.getPathSegments(boolean decode)' calls 'getPath()' internally. It should call 'getPath(decode)' instead.
> As an example, consider the following path: 'a/x%2fy/b' ('%2f' = '/').
> When calling 'UriInfoImpl.getPathSegments(true)', four path segments are returned: 'a', 'x', 'y', 'b'. However, when 'UriInfoImpl.getPathSegments(false)' is called, the result is the same. Instead, 'a', 'x%2fy', 'b' is expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4200) UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()

Posted by "Sergey Beryozkin (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237256#comment-13237256 ] 

Sergey Beryozkin commented on CXF-4200:
---------------------------------------

Thanks for the patch. I ended up always passing 'false' to getPath() within the getPathSegments(boolean decoded) otherwise we have another bug, namely x%2Fy is treated as if it represents two PathSegments due to it containing the encoded '/'. The actual 'decode' flag is passed to the PathSegment implementation.  
                
> UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()
> ----------------------------------------------------------------------------
>
>                 Key: CXF-4200
>                 URL: https://issues.apache.org/jira/browse/CXF-4200
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.2, 2.6
>            Reporter: Rob ten Hove
>            Priority: Minor
>         Attachments: cxf-4200-robth-getpathsegments-decode.patch
>
>
> The function 'UriInfoImpl.getPathSegments(boolean decode)' calls 'getPath()' internally. It should call 'getPath(decode)' instead.
> As an example, consider the following path: 'a/x%2fy/b' ('%2f' = '/').
> When calling 'UriInfoImpl.getPathSegments(true)', four path segments are returned: 'a', 'x', 'y', 'b'. However, when 'UriInfoImpl.getPathSegments(false)' is called, the result is the same. Instead, 'a', 'x%2fy', 'b' is expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4200) UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()

Posted by "Rob ten Hove (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob ten Hove updated CXF-4200:
------------------------------

    Attachment: cxf-4200-robth-getpathsegments-decode.patch

Attached patch.
                
> UriInfoImpl.getPathSegments(decode) does not pass 'decode' flag to getPath()
> ----------------------------------------------------------------------------
>
>                 Key: CXF-4200
>                 URL: https://issues.apache.org/jira/browse/CXF-4200
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.2, 2.6
>            Reporter: Rob ten Hove
>            Priority: Minor
>         Attachments: cxf-4200-robth-getpathsegments-decode.patch
>
>
> The function 'UriInfoImpl.getPathSegments(boolean decode)' calls 'getPath()' internally. It should call 'getPath(decode)' instead.
> As an example, consider the following path: 'a/x%2fy/b' ('%2f' = '/').
> When calling 'UriInfoImpl.getPathSegments(true)', four path segments are returned: 'a', 'x', 'y', 'b'. However, when 'UriInfoImpl.getPathSegments(false)' is called, the result is the same. Instead, 'a', 'x%2fy', 'b' is expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira